Skip to content

Instantly share code, notes, and snippets.

@danielgross
danielgross / specific_gpt.py
Created January 23, 2023 15:23
A chat interface that drives GPT-3 towards more specific answers.
"""Stream a response from the OpenAI completion API."""
import os
import re
import sys
import time
import random
import openai
openai.api_key = open(os.path.expanduser("~/.openai")).read().strip()
@ashgansh
ashgansh / basel.js
Created August 10, 2023 00:40
Auto-generate OpenAPI spec w/ Anthropic Claude from any programming language
const Anthropic = require('@anthropic-ai/sdk');
const path = require('path');
const YAML = require('yaml');
const fs = require('fs');
// Initialize Anthropic SDK
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});