@rcrsr/rill-ext-gemini 0.16.0 → 0.18.1
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 +25 -26
- package/dist/index.d.ts +2 -2
- package/dist/index.js +606 -377
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -2,50 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
[rill](https://rill.run) extension for [Google Gemini](https://ai.google.dev/docs) API integration. Provides `message`, `messages`, `embed`, `embed_batch`, `tool_loop`, and `generate` host functions.
|
|
4
4
|
|
|
5
|
-
> **Experimental.** Breaking changes will occur before stabilization.
|
|
6
|
-
|
|
7
5
|
## Install
|
|
8
6
|
|
|
9
7
|
```bash
|
|
10
8
|
npm install @rcrsr/rill-ext-gemini
|
|
11
9
|
```
|
|
12
10
|
|
|
13
|
-
**Peer dependencies:** `@rcrsr/rill`
|
|
14
|
-
|
|
15
11
|
## Quick Start
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
**rill-config.json**
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"main": "hello.rill",
|
|
18
|
+
"extensions": {
|
|
19
|
+
"mounts": {
|
|
20
|
+
"llm": "@rcrsr/rill-ext-gemini"
|
|
21
|
+
},
|
|
22
|
+
"config": {
|
|
23
|
+
"llm": {
|
|
24
|
+
"api_key": "${GOOGLE_API_KEY}",
|
|
25
|
+
"model": "gemini-2.0-flash"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
api_key: process.env.GOOGLE_API_KEY!,
|
|
23
|
-
model: 'gemini-2.0-flash',
|
|
24
|
-
});
|
|
25
|
-
const prefixed = prefixFunctions('gemini', ext);
|
|
26
|
-
const { dispose, ...functions } = prefixed;
|
|
32
|
+
**hello.rill**
|
|
27
33
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
callbacks: { onLog: (v) => console.log(v) },
|
|
31
|
-
});
|
|
34
|
+
```rill
|
|
35
|
+
use<ext:llm> => $llm
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
$llm.message("Explain TCP handshakes") -> each { log }
|
|
38
|
+
```
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
```bash
|
|
41
|
+
rill-run
|
|
37
42
|
```
|
|
38
43
|
|
|
39
44
|
## Documentation
|
|
40
45
|
|
|
41
46
|
See [full documentation](docs/extension-llm-gemini.md) for configuration, functions, error handling, events, and examples.
|
|
42
47
|
|
|
43
|
-
## Related
|
|
44
|
-
|
|
45
|
-
- [rill](https://github.com/rcrsr/rill) — Core language runtime
|
|
46
|
-
- [Extensions Guide](https://github.com/rcrsr/rill/blob/main/docs/integration-extensions.md) — Extension contract and patterns
|
|
47
|
-
- [Host API Reference](https://github.com/rcrsr/rill/blob/main/docs/ref-host-api.md) — Runtime context and host functions
|
|
48
|
-
|
|
49
48
|
## License
|
|
50
49
|
|
|
51
50
|
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { ExtensionConfigSchema,
|
|
3
|
+
import { ExtensionConfigSchema, ExtensionFactoryResult, ExtensionManifest } from '@rcrsr/rill';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Base configuration for LLM extensions
|
|
@@ -72,7 +72,7 @@ export type GeminiExtensionConfig = LLMProviderConfig;
|
|
|
72
72
|
* await ext.dispose();
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
export declare function createGeminiExtension(config: GeminiExtensionConfig):
|
|
75
|
+
export declare function createGeminiExtension(config: GeminiExtensionConfig): ExtensionFactoryResult;
|
|
76
76
|
export declare const VERSION: string;
|
|
77
77
|
export declare const configSchema: ExtensionConfigSchema;
|
|
78
78
|
export declare const extensionManifest: ExtensionManifest;
|