Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Azure, OpenAI, Palm, Anthropic, Cohere, Replicate Models - using litellm #134

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ packages = [{ include = "smol_dev" }]
[tool.poetry.dependencies]
python = "^3.11"
openai = "^0.27.8"
litellm = "^0.1.351"
openai-function-call = "^0.0.5"
tenacity = "^8.2.2"
agent-protocol = "^0.1.1"
Expand Down
3 changes: 2 additions & 1 deletion v0/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def main(prompt, directory=DEFAULT_DIR, model="gpt-3.5-turbo"):
)
def generate_response(system_prompt, user_prompt, model="gpt-3.5-turbo", *args):
import openai
from litellm import completion

# Set up your OpenAI API credentials
openai.api_key = os.environ["OPENAI_API_KEY"]
Expand All @@ -76,7 +77,7 @@ def generate_response(system_prompt, user_prompt, model="gpt-3.5-turbo", *args):
}

# Send the API request
response = openai.ChatCompletion.create(**params)
response = completion(**params)

# Get the reply from the API response
reply = response.choices[0]["message"]["content"]
Expand Down