ask-agent 0.4.0 → 0.4.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/lib/ask/agent/chat.rb +11 -3
- data/lib/ask/agent/version.rb +1 -1
- 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: 4e56503ad4f2642bb671cfb6c1fe63b05dbfa507dbdc6fba048a822a2a4bbc74
|
|
4
|
+
data.tar.gz: 13e0fe8facaac2823e7b73d6aaf7abbb71404e5f557b9e318a66bf7f767e4eda
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a4e45c5a696d28b887fdf63434fa304145428c6bf8c6dd14dec044c1d566267ce358ac4a347f761cbbee7c1b01e82faad8d4932ec21b35a8b528cbe217c1b36a
|
|
7
|
+
data.tar.gz: c41b5afbf3ae4e0a1e3899bfa8b3c128c0209377e78c23923ab3a5da7538d491da3d665d665914dc1f7f88a15210c0cbf5e47ab5f1110ed4b21d42f1ed9fc4cc
|
data/lib/ask/agent/chat.rb
CHANGED
|
@@ -119,11 +119,19 @@ module Ask
|
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
def provider_config(slug)
|
|
122
|
-
|
|
123
|
-
base
|
|
122
|
+
# Try the full slug credential name first, then fall back to the
|
|
123
|
+
# base name for compound slugs (e.g., opencode_go → opencode).
|
|
124
|
+
# The multi-name resolve tries each in order and returns the first match.
|
|
125
|
+
cred_names = [:"#{slug}_api_key"]
|
|
126
|
+
if slug.to_s.include?("_")
|
|
127
|
+
cred_names << :"#{slug.to_s.split("_").first}_api_key"
|
|
128
|
+
end
|
|
129
|
+
key = Ask::Auth.resolve(*cred_names) rescue nil
|
|
130
|
+
|
|
131
|
+
base_url = Ask::Auth.resolve(:"#{slug}_api_base") rescue nil
|
|
124
132
|
config = { api_key: key }
|
|
125
133
|
config[:"#{slug}_api_key"] = key
|
|
126
|
-
config[:"#{slug}_api_base"] =
|
|
134
|
+
config[:"#{slug}_api_base"] = base_url if base_url
|
|
127
135
|
Ask::LLM::Config.new(config)
|
|
128
136
|
end
|
|
129
137
|
|
data/lib/ask/agent/version.rb
CHANGED