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

Handle custom model API #190

Open
Etelis opened this issue Dec 9, 2024 · 1 comment
Open

Handle custom model API #190

Etelis opened this issue Dec 9, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@Etelis
Copy link
Contributor

Etelis commented Dec 9, 2024

Hey,

I've been looking at the documentation and I can't find an easy approach to create a custom model, like one based on an API.

I came across FunctionModel, but according to the docs, it seems to be more of a testing pipeline rather than a generic interface.

Could you please provide guidance on how to create such a custom model?

@samuelcolvin
Copy link
Member

You just need to implement the Model abstract base class.

To do that, you'll likely also need to implement the other abstract types in that class AgentModel, StreamTextResponse and StreamStructuredResponse.

For examples you can look at:

We should document how to create a custom model.

@samuelcolvin samuelcolvin added documentation Improvements or additions to documentation good first issue Good for newcomers and removed good first issue Good for newcomers labels Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants