From a88b02dec8f980dc774955fb256b529fda5ce3e9 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Wed, 16 Aug 2023 16:50:36 -0700 Subject: [PATCH] v0 liteLLM --- chain.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chain.py b/chain.py index ce81f23..bbf6039 100644 --- a/chain.py +++ b/chain.py @@ -4,7 +4,7 @@ from langchain.chains import ConversationalRetrievalChain, LLMChain from langchain.chains.question_answering import load_qa_chain from langchain.llms import OpenAI, Replicate -from langchain.chat_models import ChatOpenAI +from langchain.chat_models import ChatOpenAI, ChatLiteLLM from langchain.embeddings.openai import OpenAIEmbeddings from langchain.vectorstores import SupabaseVectorStore from supabase.client import Client, create_client @@ -117,7 +117,7 @@ def get_chain_gpt(vectorstore, callback_handler=None): max_tokens=500, ) - llm = ChatOpenAI( + llm = ChatLiteLLM( model_name="gpt-3.5-turbo", temperature=0.5, openai_api_key=st.secrets["OPENAI_API_KEY"],