Ruby Implementation of Nano Bots: small, AI-powered bots that can be easily shared as a single file, designed to support multiple providers such as Anthropic Claude, Cohere Command, Google Gemini, Maritaca AI, Mistral AI, Ollama, OpenAI ChatGPT, and others, with support for calling tools (functions).
Vertex AI API accepts system_instruction in its payload, but Generative Language API does not and returns a 400 error. This PR fixes it by using different approaches for the different APIs.
Additionally:
Implementing safeguards to prevent errors from unexpected data structures lacking content and parts.
Beginning to raise exceptions when a generation is stopped due to safety concerns.
Related to #21
Vertex AI API accepts
system_instruction
in its payload, but Generative Language API does not and returns a 400 error. This PR fixes it by using different approaches for the different APIs.Additionally: