You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
can you shows the config example without your real api key? it's not working for me and shows 2025-03-10 19:46:03.938 | WARNING | __main__:main:19 - Processing your request... 2025-03-10 19:46:03.938 | INFO | app.agent.base:run:137 - Executing step 1/30 2025-03-10 19:46:05.511 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key. 2025-03-10 19:46:06.835 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key. 2025-03-10 19:46:08.462 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key.
if I use base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent", it shows 2025-03-10 20:16:58.184 | WARNING | __main__:main:19 - Processing your request... 2025-03-10 20:16:58.184 | INFO | app.agent.base:run:137 - Executing step 1/30 2025-03-10 20:16:59.562 | ERROR | app.llm:ask_tool:260 - API error: Error code: 404 2025-03-10 20:17:00.833 | ERROR | app.llm:ask_tool:260 - API error: Error code: 404. No idea how to make it works
Can you show which api base url you used for Gemini?
Global LLM configuration [llm] model = "gemini-2.0-flash" base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?" api_key = "My-free-gemini-api-key" max_tokens = 4096 temperature = 0.0 Optional configuration for specific LLM models [llm.vision] model = "gemini-2.0-flash-exp" base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?" api_key = "My-free-gemini-api-key"
if I use base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent", it shows 2025-03-10 20:16:58.184 | WARNING | __main__:main:19 - Processing your request... 2025-03-10 20:16:58.184 | INFO | app.agent.base:run:137 - Executing step 1/30 2025-03-10 20:16:59.562 | ERROR | app.llm:ask_tool:260 - API error: Error code: 404 2025-03-10 20:17:00.833 | ERROR | app.llm:ask_tool:260 - API error: Error code: 404. No idea how to make it works
thank you for the config, that work, but that leads to rate limiting errors, now this is free 1mil token api, so it cannot be on server side and from the front side I see only one or more actual request made, so something is off in that setup
Using gemini api will end up with: Validation error in ask_tool: Message must contain either 'content' or 'tool_calls'
Either flash or flash-exp.
Maybe gemini has something error with function_call
Using gemini api will end up with: Validation error in ask_tool: Message must contain either 'content' or 'tool_calls' Either flash or flash-exp. Maybe gemini has something error with function_call
You can easily bypass this by editing app/agent/toolcall.py.
Add this call into a file
class Response:
def __init__(self):
self.tool_calls = None
self.content = None
then add a while clause before calling the LLM.
while (response.tool_calls == None) and (response.content == None):
response = await self.llm.ask_tool(
messages=self.messages,
system_msgs=[Message.system_message(self.system_prompt)]
if self.system_prompt
else None,
tools=self.available_tools.to_params(),
tool_choice=self.tool_choices,
)
It will try to call LLM until it provides any action to take. Sometimes, LLM is not able to provide the next steps, so we end up with the issue.
Using gemini api will end up with: Validation error in ask_tool: Message must contain either 'content' or 'tool_calls' Either flash or flash-exp. Maybe gemini has something error with function_call
You can easily bypass this by editing app/agent/toolcall.py.
Add this call into a file
class Response:
def __init__(self):
self.tool_calls = None
self.content = None
then add a while clause before calling the LLM.
while (response.tool_calls == None) and (response.content == None):
response = await self.llm.ask_tool(
messages=self.messages,
system_msgs=[Message.system_message(self.system_prompt)]
if self.system_prompt
else None,
tools=self.available_tools.to_params(),
tool_choice=self.tool_choices,
)
It will try to call LLM until it provides any action to take. Sometimes, LLM is not able to provide the next steps, so we end up with the issue.
Would this resolve an issue with "Error in PlanningFlow: Parameter 'title' is required for command: create"?
Activity
manny1185 commentedon Mar 9, 2025
how much you pay?
jahaskell53 commentedon Mar 10, 2025
Gemini 2.0 is free. You can create an API key here.
ThyannSeng commentedon Mar 10, 2025
can you shows the config example without your real api key? it's not working for me and shows
2025-03-10 19:46:03.938 | WARNING | __main__:main:19 - Processing your request... 2025-03-10 19:46:03.938 | INFO | app.agent.base:run:137 - Executing step 1/30 2025-03-10 19:46:05.511 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key. 2025-03-10 19:46:06.835 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key. 2025-03-10 19:46:08.462 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key.wielenmaker commentedon Mar 10, 2025
Can you show which api base url you used for Gemini?
ThyannSeng commentedon Mar 10, 2025
` Global LLM configuration
[llm]
model = "gemini-2.0-flash"
base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?"
api_key = "My-free-gemini-api-key"
max_tokens = 4096
temperature = 0.0
Optional configuration for specific LLM models
[llm.vision]
model = "gemini-2.0-flash-exp"
base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?"
api_key = "My-free-gemini-api-key"
`
pazoff commentedon Mar 10, 2025
2025-03-10 09:01:08.741 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key.
2025-03-10 09:01:09.817 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key.
2025-03-10 09:01:11.136 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key.
2025-03-10 09:01:12.480 | ERROR | app.llm:ask_tool:256 - Authentication failed. Check API key.
ThyannSeng commentedon Mar 10, 2025
if I use
base_url = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent", it shows2025-03-10 20:16:58.184 | WARNING | __main__:main:19 - Processing your request... 2025-03-10 20:16:58.184 | INFO | app.agent.base:run:137 - Executing step 1/30 2025-03-10 20:16:59.562 | ERROR | app.llm:ask_tool:260 - API error: Error code: 404 2025-03-10 20:17:00.833 | ERROR | app.llm:ask_tool:260 - API error: Error code: 404. No idea how to make it workspazoff commentedon Mar 10, 2025
This Config works for me:
taken from https://ai.google.dev/gemini-api/docs/openai#python
pazoff commentedon Mar 10, 2025
Look Here: https://ai.google.dev/gemini-api/docs/openai#python
ThyannSeng commentedon Mar 10, 2025
Thanks! It's working.
pazoff commentedon Mar 10, 2025
But there is other problems:
| ERROR | app.llm:ask_tool:252 - Validation error in ask_tool: Message must contain either 'content' or 'tool_calls'
manny1185 commentedon Mar 10, 2025
Thanks,i have supply one
krigeta commentedon Mar 11, 2025
can we use thinking models as well?
marko999 commentedon Mar 11, 2025
thank you for the config, that work, but that leads to rate limiting errors, now this is free 1mil token api, so it cannot be on server side and from the front side I see only one or more actual request made, so something is off in that setup
yd-ccccai commentedon Mar 12, 2025
Using gemini api will end up with: Validation error in ask_tool: Message must contain either 'content' or 'tool_calls'
Either flash or flash-exp.
Maybe gemini has something error with function_call
kbrajwani commentedon Mar 14, 2025
You can easily bypass this by editing app/agent/toolcall.py.
Add this call into a file
then add a while clause before calling the LLM.
It will try to call LLM until it provides any action to take. Sometimes, LLM is not able to provide the next steps, so we end up with the issue.
DKauser commentedon Mar 14, 2025
Would this resolve an issue with "Error in PlanningFlow: Parameter 'title' is required for command: create"?