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

Could this tool be extended to include models outside of OpenAI? #69

Open
TiansuYu opened this issue Jul 1, 2024 · 4 comments
Open
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@TiansuYu
Copy link

TiansuYu commented Jul 1, 2024

I am thinking about trying out models from Anthropic and MistralAI on this tool as well. Given how similar the model APIs are between these companies. Could this be easily achieved on this tool?

@marcolardera
Copy link
Owner

marcolardera commented Jul 3, 2024

Hello @TiansuYu, the providers supported out-of-the box are OpenAI and Azure. However, it should require only a small code modification to add other providers, given that the the API are the same (with just a different base endpoint)...

I add this suggestion to my "to to list when I find time/motivation" :)

In the meantime, you can try to set the environment variable OPENAI_BASE_ENDPOINT to the base endpoint of Anthropic/Mistral. Also set your API key provided by one of those suppliers. If the API is exactly the same as OpenAI, in theory, it should work. Let me know if it is the case...

@marcolardera marcolardera added enhancement New feature or request good first issue Good for newcomers labels Jul 3, 2024
@TiansuYu
Copy link
Author

TiansuYu commented Jul 6, 2024

I will experiment around it. Open a PR if my time permits. 😄

@TiansuYu
Copy link
Author

TiansuYu commented Jul 6, 2024

Draft PR #71
Seems API KEY loading is not working as intended, needs some further work on this.

@TiansuYu
Copy link
Author

TiansuYu commented Jul 6, 2024

Some general comments on how to refactor this repo:

  • Set a Config class responsible for resolving config vars from various places. (Currently, it is bit of a mess.)
  • Set an abstract Model class for main method to call Model.prompt, resolve to different Model implementations based on supplier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants