Skip to content

Commit

Permalink
v0 litellm
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan-jaff committed Sep 5, 2023
1 parent 2c39d13 commit d1b09f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ django-choices
django-filter
openedx-events
openai
litellm
pandas
6 changes: 3 additions & 3 deletions taxonomy/openai/client.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""openai client"""

import openai
import litellm

from django.conf import settings

openai.api_key = settings.OPENAI_API_KEY
litellm.api_key = settings.OPENAI_API_KEY


def chat_completion(prompt):
Expand All @@ -14,7 +14,7 @@ def chat_completion(prompt):
Arguments:
prompt (str): chatGPT prompt
"""
response = openai.ChatCompletion.create(
response = litellm.completion(
model="gpt-3.5-turbo",
messages=[
{"role": "user", "content": prompt},
Expand Down

0 comments on commit d1b09f6

Please sign in to comment.