ai-agents 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -1
- data/lib/agents/version.rb +1 -1
- data/lib/agents.rb +44 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a7f03e74e5438811518c7dc1f6cf24414d24453770858d2a8e12dda823ba428
|
4
|
+
data.tar.gz: d87e91cc47ae009e23db840a29f0fbce3d4c0e913ca3364c1fdaddcdc1816623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 900501d264a748f85f2c0faa1eb3e1d23a0d9bfc0416eaeebc6fa814446ba0e22d61a93cc97095a76982b915c711603fd7ded72fcc7911bc18875834f95530ab
|
7
|
+
data.tar.gz: 3fceb514188c816412726fa27ff5f88c32b81d6d2d19fe8895576428235ac44eab8161c729e08424c560b44a907dfd9c1c412aa703aaed1bc9694fdb7065f79f
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,18 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.2.2] - 2025-07-14
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Support for additional LLM providers:
|
12
|
+
- DeepSeek (`deepseek_api_key`)
|
13
|
+
- OpenRouter (`openrouter_api_key`)
|
14
|
+
- Ollama (`ollama_api_base`)
|
15
|
+
- AWS Bedrock (`bedrock_api_key`, `bedrock_secret_key`, `bedrock_region`, `bedrock_session_token`)
|
16
|
+
- OpenAI API base URL configuration (`openai_api_base`) for custom endpoints
|
17
|
+
- OpenAI organization and project ID configuration (`openai_organization_id`, `openai_project_id`)
|
18
|
+
- Updated `Configuration#configured?` method to check all supported providers
|
19
|
+
|
8
20
|
## [0.2.1] - 2025-07-08
|
9
21
|
|
10
22
|
### Fixed
|
@@ -39,4 +51,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
39
51
|
- Thread-safe agent execution architecture
|
40
52
|
- Tool integration system
|
41
53
|
- Shared context management
|
42
|
-
- Provider support for OpenAI, Anthropic, and Gemini
|
54
|
+
- Provider support for OpenAI, Anthropic, and Gemini
|
data/lib/agents/version.rb
CHANGED
data/lib/agents.rb
CHANGED
@@ -42,18 +42,52 @@ module Agents
|
|
42
42
|
|
43
43
|
def configure_ruby_llm!
|
44
44
|
RubyLLM.configure do |config|
|
45
|
-
config
|
46
|
-
config
|
47
|
-
config.gemini_api_key = configuration.gemini_api_key if configuration.gemini_api_key
|
48
|
-
config.default_model = configuration.default_model
|
49
|
-
config.log_level = configuration.debug == true ? :debug : :info
|
50
|
-
config.request_timeout = configuration.request_timeout if configuration.request_timeout
|
45
|
+
configure_providers(config)
|
46
|
+
configure_general_settings(config)
|
51
47
|
end
|
52
48
|
end
|
49
|
+
|
50
|
+
def configure_providers(config)
|
51
|
+
# OpenAI configuration
|
52
|
+
apply_if_present(config, :openai_api_key)
|
53
|
+
apply_if_present(config, :openai_api_base)
|
54
|
+
apply_if_present(config, :openai_organization_id)
|
55
|
+
apply_if_present(config, :openai_project_id)
|
56
|
+
|
57
|
+
# Other providers
|
58
|
+
apply_if_present(config, :anthropic_api_key)
|
59
|
+
apply_if_present(config, :gemini_api_key)
|
60
|
+
apply_if_present(config, :deepseek_api_key)
|
61
|
+
apply_if_present(config, :openrouter_api_key)
|
62
|
+
apply_if_present(config, :ollama_api_base)
|
63
|
+
|
64
|
+
# AWS Bedrock configuration
|
65
|
+
apply_if_present(config, :bedrock_api_key)
|
66
|
+
apply_if_present(config, :bedrock_secret_key)
|
67
|
+
apply_if_present(config, :bedrock_region)
|
68
|
+
apply_if_present(config, :bedrock_session_token)
|
69
|
+
end
|
70
|
+
|
71
|
+
def configure_general_settings(config)
|
72
|
+
config.default_model = configuration.default_model
|
73
|
+
config.log_level = configuration.debug == true ? :debug : :info
|
74
|
+
apply_if_present(config, :request_timeout)
|
75
|
+
end
|
76
|
+
|
77
|
+
def apply_if_present(config, key)
|
78
|
+
value = configuration.send(key)
|
79
|
+
config.send("#{key}=", value) if value
|
80
|
+
end
|
53
81
|
end
|
54
82
|
|
55
83
|
class Configuration
|
56
|
-
|
84
|
+
# Provider API keys and configuration
|
85
|
+
attr_accessor :openai_api_key, :openai_api_base, :openai_organization_id, :openai_project_id
|
86
|
+
attr_accessor :anthropic_api_key, :gemini_api_key, :deepseek_api_key, :openrouter_api_key, :ollama_api_base,
|
87
|
+
:bedrock_api_key, :bedrock_secret_key, :bedrock_region, :bedrock_session_token
|
88
|
+
|
89
|
+
# General configuration
|
90
|
+
attr_accessor :request_timeout, :default_model, :debug
|
57
91
|
|
58
92
|
def initialize
|
59
93
|
@default_model = "gpt-4o-mini"
|
@@ -64,7 +98,9 @@ module Agents
|
|
64
98
|
# Check if at least one provider is configured
|
65
99
|
# @return [Boolean] True if any provider has an API key
|
66
100
|
def configured?
|
67
|
-
@openai_api_key || @anthropic_api_key || @gemini_api_key
|
101
|
+
@openai_api_key || @anthropic_api_key || @gemini_api_key ||
|
102
|
+
@deepseek_api_key || @openrouter_api_key || @ollama_api_base ||
|
103
|
+
@bedrock_api_key
|
68
104
|
end
|
69
105
|
end
|
70
106
|
end
|