@rcrsr/rill-ext-gemini 0.11.0 → 0.18.0

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 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
- ```typescript
18
- import { parse, execute, createRuntimeContext, prefixFunctions } from '@rcrsr/rill';
19
- import { createGeminiExtension } from '@rcrsr/rill-ext-gemini';
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
- const ext = createGeminiExtension({
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
- const ctx = createRuntimeContext({
29
- functions,
30
- callbacks: { onLog: (v) => console.log(v) },
31
- });
34
+ ```rill
35
+ use<ext:llm> => $llm
32
36
 
33
- const script = `gemini::message("Explain TCP handshakes")`;
34
- const result = await execute(parse(script), ctx);
37
+ $llm.message("Explain TCP handshakes") -> each { log }
38
+ ```
35
39
 
36
- dispose?.();
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, ExtensionResult } from '@rcrsr/rill';
3
+ import { ExtensionConfigSchema, ExtensionFactoryResult, ExtensionManifest } from '@rcrsr/rill';
4
4
 
5
5
  /**
6
6
  * Base configuration for LLM extensions
@@ -72,9 +72,10 @@ export type GeminiExtensionConfig = LLMProviderConfig;
72
72
  * await ext.dispose();
73
73
  * ```
74
74
  */
75
- export declare function createGeminiExtension(config: GeminiExtensionConfig): ExtensionResult;
76
- export declare const VERSION = "0.0.1";
75
+ export declare function createGeminiExtension(config: GeminiExtensionConfig): ExtensionFactoryResult;
76
+ export declare const VERSION: string;
77
77
  export declare const configSchema: ExtensionConfigSchema;
78
+ export declare const extensionManifest: ExtensionManifest;
78
79
 
79
80
  export {
80
81
  LLMProviderConfig as LLMExtensionConfig,