Hisab Cloud commited on
Commit
388ce9e
·
1 Parent(s): 118c42c

Improve code

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -76,12 +76,13 @@ def create_conversational_chain(vector_store):
76
  # streaming = True,
77
  # model = "models/text-bison-001", # "google/flan-t5-large"
78
  # callbacks=[StreamingStdOutCallbackHandler()],
79
- # input = {"temperature": 0.07, "max_length" :800,"top_p":0.95})
80
  llm = AzureOpenAI(
81
  streaming = True,
82
  deployment_name="HCloudChat",
83
  model_name="gpt-35-turbo",
84
- callbacks=[StreamingStdOutCallbackHandler()])
 
85
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
86
 
87
  chain = ConversationalRetrievalChain.from_llm(llm=llm, chain_type='stuff',
 
76
  # streaming = True,
77
  # model = "models/text-bison-001", # "google/flan-t5-large"
78
  # callbacks=[StreamingStdOutCallbackHandler()],
79
+ # input = {"temperature": 0.7, "max_length" :800,"top_p":1})
80
  llm = AzureOpenAI(
81
  streaming = True,
82
  deployment_name="HCloudChat",
83
  model_name="gpt-35-turbo",
84
+ callbacks=[StreamingStdOutCallbackHandler()],
85
+ input = {"temperature": 0.7, "max_tokens" :1024,"top_p":1})
86
  memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
87
 
88
  chain = ConversationalRetrievalChain.from_llm(llm=llm, chain_type='stuff',