Wajahat698 commited on
Commit
400bb75
·
verified ·
1 Parent(s): 920787c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1293,7 +1293,14 @@ prompt_template = ChatPromptTemplate.from_messages([
1293
  ])
1294
 
1295
  # Create Langchain Agent
1296
- llm = ChatOpenAI(model="gpt-4o", temperature=0.7)
 
 
 
 
 
 
 
1297
  llm_with_tools = llm.bind_tools(tools)
1298
 
1299
  # Define the agent pipeline
 
1293
  ])
1294
 
1295
  # Create Langchain Agent
1296
+ llm = ChatOpenAI(
1297
+ model="gpt-4o", # Use GPT-4 optimized model
1298
+ temperature=0.8, # Balanced creativity and adherence
1299
+ max_tokens=2000, # Ensure sufficient output length
1300
+ top_p=0.9, # Nucleus sampling for diverse outputs
1301
+ frequency_penalty=0.0, # Prevent repetitive responses
1302
+ presence_penalty=0.6 # Encourage introducing new topics
1303
+ )
1304
  llm_with_tools = llm.bind_tools(tools)
1305
 
1306
  # Define the agent pipeline