Skip to content

added support for openrouter #30

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Guido1Alessandro1Trevisan

Added support for any llm by subclassing ChatOpenAI.

@pyoneerC
Copy link
Contributor

  • maybe check if the key is actually there before trying to use it

  • looks like some of the error messages are kind of saying the same thing twice

  • might be good to throw in some tests, like what happens if one key is missing or both

  • could add a short note in the code saying what that new class is for

basically it's good, just needs a little cleanup and maybe a test or two

@Guido1Alessandro1Trevisan
Copy link
Author

@pyoneerC The code now checks the key using os.getenv and returns a single error message (instead of two) if the key is set to None. I added a brief note in the Openrouter class to explain its purpose. I tested the code for cases where one key is missing or both are missing, but I feel like adding a test for a missing key might be overkill. Should I perform the test when instantiating the class or when running the CLI command?

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.

2 participants