θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Conversation

@timothycarambat
Copy link
Member

Pull Request Type

  • ✨ feat
  • πŸ› fix
  • ♻️ refactor
  • πŸ’„ style
  • πŸ”¨ chore
  • πŸ“ docs

Relevant Issues

resolves #907

What is in this change?

When there is an incomplete message history that ends with assistant the Gemini API will throw an error as you cannot have multiple back-to-back model chats for multi-turn.

Additionally, sometimes the model may return fetch failed due to the user sending an error that was marked unsafe and Google refuses to respond.

Additional Information

Add any other context about the Pull Request here that was not captured above.

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@timothycarambat timothycarambat merged commit 0dd6001 into master Mar 27, 2024
@timothycarambat timothycarambat deleted the 907-gemini-handle-saftey-throw branch March 27, 2024 00:20
cabwds pushed a commit to cabwds/anything-llm that referenced this pull request Jul 3, 2025
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

Successfully merging this pull request may close these issues.

[BUG]: Gemini Bad Request Error

2 participants