peichao.dong commited on
Commit
4703150
1 Parent(s): c838dd8

change model to stream reponse

Browse files
Files changed (1) hide show
  1. models.py +2 -2
models.py CHANGED
@@ -4,9 +4,9 @@ from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
4
 
5
  def llm(temperature=0) -> BaseLanguageModel:
6
  # gpt-3.5
7
- # return ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=temperature)
8
 
9
- return ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=temperature, model_name="gpt-4")
10
  # gpt-4
11
  # return ChatOpenAI(temperature=temperature, model_name="gpt-4")
12
 
 
4
 
5
  def llm(temperature=0) -> BaseLanguageModel:
6
  # gpt-3.5
7
+ return ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=temperature)
8
 
9
+ # return ChatOpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()], temperature=temperature, model_name="gpt-4")
10
  # gpt-4
11
  # return ChatOpenAI(temperature=temperature, model_name="gpt-4")
12