sublayerapp / sublayer

A model-agnostic Ruby Generative AI DSL and framework. Provides base classes for building Generators, Actions, Tasks, and Agents that can be used to build AI powered applications in Ruby.
https://docs.sublayer.com
MIT License
109 stars 2 forks source link

Multi-model providers break the universal function calling expectation inside providers #22

Open swerner opened 5 months ago

swerner commented 5 months ago

For model providers like Groq, Local, OpenRouter, etc, each different model you might want to use inside these different services could have different function calling/tool calling mechanism and quirks: Specifically I just tried generating something with Groq+llama3 and the xml response came back in a different format.

For now, going to move away from providing direct solutions for things like Groq and make it similar to what we're doing with output_adapters where you can specify a custom AI provider in your code to use and implement the specific quirks of that model. Over time we'll find patterns that work with things like Llama3 or Mistral or Hermes2 that we can provide as bases.