-
Notifications
You must be signed in to change notification settings - Fork 922
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Added OpenRouter support and model testing #1058
Open
CoreyJness
wants to merge
2
commits into
Skyvern-AI:main
Choose a base branch
from
CoreyJness:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❌ Changes requested. Reviewed everything up to 8ddd110 in 36 seconds
More details
- Looked at
132
lines of code in3
files - Skipped
0
files when reviewing. - Skipped posting
2
drafted comments based on config settings.
1. docs/integrations/openrouter.py:11
- Draft comment:
The environment variable for the OpenRouter API key should be accessed using 'OPENROUTER_API_KEY' to maintain consistency with the rest of the codebase. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment is suggesting a change to maintain consistency, which is a valid code quality improvement. If the rest of the codebase uses uppercase for environment variables, this change would be beneficial. However, without seeing the rest of the codebase, it's speculative. The comment is about a change that could be made to the new code, so it is relevant to the diff.
I might be assuming too much about the rest of the codebase without evidence. The comment could be speculative if there's no established convention for environment variable names.
Even if speculative, the suggestion aligns with common practices for environment variable naming, which often use uppercase. This could be a reasonable assumption unless proven otherwise.
Keep the comment as it suggests a reasonable code quality improvement that aligns with common practices for environment variable naming.
2. setup.sh:333
- Draft comment:
Missing closing parenthesis for the python3 command. Add a closing parenthesis to complete the command. - Reason this comment was not posted:
Based on historical feedback, this comment is too similar to comments previously marked by users as bad.
Workflow ID: wflow_mbe1eHDXtBb1UAkP
Want Ellipsis to fix these issues? Tag @ellipsis-dev
in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
CoreyJness
commented
Oct 26, 2024
ellipsis-dev bot
added a commit
that referenced
this pull request
Oct 26, 2024
…rt and model testing);
hope it will be added soon. |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In response to Issue #991:
This PR adds support for OpenRouter integration to enable testing across multiple visual models. By implementing this, users can now configure and use OpenRouter models to handle various tasks and evaluate model performance on different difficulty levels.
Key Changes:
OpenRouter API Integration:
Added functions to handle requests to OpenRouter’s /chat/completions endpoint.
Updated configuration to support API key input for OpenRouter during setup.
Included environment variable handling for OPENROUTER_API_KEY and default model options.
Model Testing Support:
Implemented test_openrouter_model() function, which tests OpenRouter’s visual models by sending sample payloads and returning structured responses.
Enhanced configuration to allow users to select specific OpenRouter models (e.g., ANTHROPIC/CLAUDE-3.5-SONNET, meta-llama/llama-3.2-90b-vision-instruct, google/gemini-flash-1.5-8b) during setup.
Testing and Validation:
Functional Testing: Successfully tested the get_openrouter_response() and test_openrouter_model() functions to verify model response and error handling.
Pre-commit Hooks: Code was tested to ensure it complies with pre-commit requirements. Please review for MyPy and Alembic issues.
Important
Added OpenRouter support with API integration, model testing, and setup configuration.
get_openrouter_response()
inopenrouter.py
to handle requests to OpenRouter's/chat/completions
endpoint.setup.sh
to include OpenRouter API key configuration and model options.test_openrouter_model()
inmodel_testing.py
to test OpenRouter models with sample payloads.setup.sh
to support OpenRouter API key input and model selection during setup.get_openrouter_response()
andtest_openrouter_model()
.This description was created by
for 8ddd110. It will automatically update as commits are pushed.