Coding-With commited on
Commit
1b6c234
·
1 Parent(s): 01038c9

Update main.py to limit max turns in streamed responses to 2 and modify model version in linkedin_assistant.py from "gemini-2.5-flash-preview-05-20" to "gemini-2.5-flash" for consistency and improved performance.

Browse files
Files changed (2) hide show
  1. agent/linkedin_assistant.py +1 -1
  2. main.py +1 -1
agent/linkedin_assistant.py CHANGED
@@ -70,7 +70,7 @@ async def create_assistant_agent():
70
  """
71
  ),
72
  model=OpenAIChatCompletionsModel(
73
- model="gemini-2.5-flash-preview-05-20", openai_client=gemini_client
74
  ),
75
  # mcp_servers=[mcp_server_linkedin, mcp_server_weather],
76
  tools=[post_content_linkedin, create_post_links_image, get_user_info],
 
70
  """
71
  ),
72
  model=OpenAIChatCompletionsModel(
73
+ model="gemini-2.5-flash", openai_client=gemini_client
74
  ),
75
  # mcp_servers=[mcp_server_linkedin, mcp_server_weather],
76
  tools=[post_content_linkedin, create_post_links_image, get_user_info],
main.py CHANGED
@@ -57,7 +57,7 @@ async def agent_fastapi(input):
57
 
58
 
59
  async def stream_response(input):
60
- result = Runner.run_streamed(assistant_agent, input=input)
61
  async for events in result.stream_events():
62
  if events.type == "raw_response_event" and isinstance(
63
  events.data, ResponseTextDeltaEvent
 
57
 
58
 
59
  async def stream_response(input):
60
+ result = Runner.run_streamed(assistant_agent, input=input,max_turns=2)
61
  async for events in result.stream_events():
62
  if events.type == "raw_response_event" and isinstance(
63
  events.data, ResponseTextDeltaEvent