xlang-ai / OpenAgents

[COLM 2024] OpenAgents: An Open Platform for Language Agents in the Wild
https://arxiv.org/abs/2310.10634
Apache License 2.0
3.93k stars 432 forks source link

Google Palm LLM option not working with openagent #64

Open yadavj2008 opened 11 months ago

yadavj2008 commented 11 months ago

hello,

I'm trying to use Google Palm llm for the data agent tasks, but when i tried to use this palm model I'm getting below error. Can you please guide on this?.

Also, is there any plan to add google vertexAI or Google Palm options in the model selection with Openagents?

Retrying langchain.chat_models.google_palm.chat_with_retry.._chat_with_retry in 2.0 seconds as it raised InvalidArgument: 400 GenerateMessageRequest.prompt.messages[5].content: message must include non empty content . Retrying langchain.chat_models.google_palm.chat_with_retry.._chat_with_retry in 4.0 seconds as it raised InvalidArgument: 400 GenerateMessageRequest.prompt.messages[5].content: message must include non empty content

Sample code from language_model.py file: from langchain.chat_models.google_palm import ChatGooglePalm llm_name == "GooglePalm": return ChatGooglePalm( model_name="models/text-bison-001", streaming=True, verbose=True, **kwargs )

Timothyxxx commented 11 months ago

Hi, thanks for your question and suggestion! We are planning to update the models list these days, would you like to also contribute that? If so, you can raise a pr with the original code and we can add this feature together!