-
Notifications
You must be signed in to change notification settings - Fork 6
fixed critical bug in configuration and add specs #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
Reion19
wants to merge
21
commits into
alexshapalov:main
Choose a base branch
from
Reion19:add-specs-and-bug-fix
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
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
589580e
dependencies -> updated
Reion19 003af80
Added .models .update and .chat methods and specs for them
Reion19 7153f1a
Add multi-AI provider support & update config handling
Reion19 c8db6af
Fix header assignment and update model list descriptions in specs
Reion19 36cea0c
Refactor AI provider classes and HTTP handling for improved structure…
Reion19 c2f7db9
rubocop -A
Reion19 b86cbeb
Refactor provider configuration and enhance initialization for multi-…
Reion19 2198cff
Refactor provider configuration by removing default values and adding…
Reion19 4ae3234
Updated readme
Reion19 7050db0
Remove unnecessary debug output and update specs for provider configu…
Reion19 d0ba5f3
Added specs for all files and rubocop -A
Reion19 552c26a
updated readme
Reion19 0201bd3
refactor code for old configuration support
Reion19 a76023e
add specs for updated functionality
Reion19 4f986c3
fix: critical bug in configuration. Now support other than openai models
Reion19 828d7db
removed comments and useless lines of code
Reion19 8794a21
refactored provider module
Reion19 714ff03
refactored specs
Reion19 e1a965d
add Base[provider] class
Reion19 839d813
rubocop -A
Reion19 a066f5d
bug fix of specs
Reion19 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| source 'https://rubygems.org' | ||
| source "https://rubygems.org" | ||
|
|
||
| ruby '>= 2.7' | ||
| ruby ">= 2.7" | ||
|
|
||
| gem 'faraday' | ||
| gem 'faraday-net_http_persistent' | ||
| gem 'rspec' | ||
| gem 'webmock' | ||
| gem "faraday" | ||
| gem "faraday-net_http_persistent" | ||
| gem "rspec" | ||
| gem "webmock" |
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,30 @@ | ||
| require 'faraday' | ||
| require 'faraday/net_http_persistent' | ||
| require 'json' | ||
| require "faraday" | ||
| require "faraday/net_http_persistent" | ||
| require "json" | ||
|
|
||
| require_relative "rubyai/client" | ||
| require_relative "rubyai/providers/providers_configuration" | ||
| require_relative "rubyai/providers/openai" | ||
| require_relative "rubyai/providers/anthropic" | ||
| require_relative "rubyai/providers/gemini" | ||
| require_relative "rubyai/provider" | ||
| require_relative "rubyai/configuration" | ||
| require_relative "rubyai/http" | ||
| require_relative "rubyai/client" | ||
| require_relative "rubyai/chat" | ||
| require_relative "rubyai/version" | ||
|
|
||
| module RubyAI | ||
| class Error < StandardError; end | ||
|
|
||
| def self.models | ||
| config.models | ||
| end | ||
|
|
||
| def self.configure | ||
| yield config | ||
| end | ||
|
|
||
| def self.config(config = {}) | ||
| @config ||= Configuration.new(config) | ||
| end | ||
| end | ||
Oops, something went wrong.
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.
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.
Do we need this also?
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.
Sorry, could you please specify what part you mean? I’m not sure what you're referring to.
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.
do we need require require_relative "rubyai/provider"
if we have required all of them directly?