keyring-agent-core 0.2.43 → 0.2.44
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.
- package/README.md +20 -1
- package/dist/index.d.ts +308 -247
- package/dist/index.js +92 -131
- package/dist/index.native.js +209 -248
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -147,11 +147,13 @@ agent.restoreHistory(saved);
|
|
|
147
147
|
|
|
148
148
|
```typescript
|
|
149
149
|
{
|
|
150
|
+
secretKey?: string; // required unless llm.apiKey is set
|
|
150
151
|
llm: {
|
|
151
|
-
apiKey
|
|
152
|
+
apiKey?: string; // your own Gemini key → calls Google directly
|
|
152
153
|
model?: string; // default: 'gemini-2.5-flash-lite'
|
|
153
154
|
maxTokens?: number; // default: 4096
|
|
154
155
|
temperature?: number; // default: 0.7
|
|
156
|
+
baseUrl?: string; // override the endpoint
|
|
155
157
|
};
|
|
156
158
|
maxIterations?: number; // default: 10
|
|
157
159
|
maxHistoryMessages?: number; // default: 50
|
|
@@ -160,6 +162,23 @@ agent.restoreHistory(saved);
|
|
|
160
162
|
}
|
|
161
163
|
```
|
|
162
164
|
|
|
165
|
+
### LLM access: two modes
|
|
166
|
+
|
|
167
|
+
| Mode | Config | Endpoint |
|
|
168
|
+
| --- | --- | --- |
|
|
169
|
+
| **Bring your own key** | `llm.apiKey` set | `https://generativelanguage.googleapis.com` — called directly with your key. `secretKey` is not required. |
|
|
170
|
+
| **Keyring proxy** | no `llm.apiKey` | `https://nft.keyring.app/api/gemini-stable` — we authenticate for you. Requires a valid `secretKey`; the first `chat()` throws otherwise. |
|
|
171
|
+
|
|
172
|
+
`llm.baseUrl` overrides the endpoint in either mode.
|
|
173
|
+
|
|
174
|
+
```typescript
|
|
175
|
+
// Bring your own key — no secretKey needed
|
|
176
|
+
new AgentCore({ llm: { apiKey: process.env.GEMINI_API_KEY! } });
|
|
177
|
+
|
|
178
|
+
// Proxy — licensed via secretKey
|
|
179
|
+
new AgentCore({ secretKey: process.env.AGENT_SECRET_KEY!, llm: {} });
|
|
180
|
+
```
|
|
181
|
+
|
|
163
182
|
## License
|
|
164
183
|
|
|
165
184
|
MIT
|