Skip to content

Commit

Permalink
Revert "Add support for Azure, OpenAI, Palm, Anthropic, Cohere, Repli…
Browse files Browse the repository at this point in the history
…cate Models - using litellm (#54)"

This reverts commit 08166a3, reversing
changes made to e656aaf.
  • Loading branch information
madawei2699 committed Apr 19, 2024
1 parent 34125c7 commit 4862a6c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions app/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import random
import uuid
import openai
import litellm
from pathlib import Path
from llama_index import ServiceContext, GPTVectorStoreIndex, LLMPredictor, RssReader, SimpleDirectoryReader, StorageContext, load_index_from_storage
from llama_index.readers.schema.base import Document
Expand Down Expand Up @@ -105,12 +104,11 @@ def get_index_name_from_file(file: str):
file_md5 = file_md5_with_extension.split('.')[0]
return file_md5

# use any of the models specified here: https://litellm.readthedocs.io/en/latest/supported/
def get_answer_from_chatGPT(messages):
dialog_messages = format_dialog_messages(messages)
logging.info('=====> Use chatGPT to answer!')
logging.info(dialog_messages)
completion = litellm.completion(
completion = openai.ChatCompletion.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": dialog_messages}]
)
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Flask==2.2.3
gunicorn==20.1.0
llama-index==0.6.9
langchain==0.0.154
litellm==0.1.232
httpx==0.23.3
requests==2.28.2
openai==0.27.1
Expand Down

0 comments on commit 4862a6c

Please sign in to comment.