Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in invoke() and ainvoke() for class AnthropicLLM #249

Closed
singhak-abbvie opened this issue Jan 17, 2025 · 2 comments
Closed

Error in invoke() and ainvoke() for class AnthropicLLM #249

singhak-abbvie opened this issue Jan 17, 2025 · 2 comments
Assignees

Comments

@singhak-abbvie
Copy link

singhak-abbvie commented Jan 17, 2025

LLMResponse pydantic model expects a string but return type is a list. Issue can be easily fixed by changing -
return LLMResponse(content=response.content) to return LLMResponse(content=response.content[0].text)

@singhak-abbvie singhak-abbvie changed the title Error in invoke() for class AnthropicLLM Error in invoke() and ainvoke() for class AnthropicLLM Jan 17, 2025
@stellasia
Copy link
Contributor

Hi @singhak-abbvie ,

Thank you for reporting the issue (and providing the fix) Do you want to open a PR with it?

@stellasia stellasia self-assigned this Feb 4, 2025
@stellasia
Copy link
Contributor

Thanks again for raising this issue, a fix has been shipped with release 1.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants