@elizaos/plugin-google-genai 1.1.0 → 2.0.0-alpha.10

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/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-google-genai",
3
- "version": "1.1.0",
3
+ "version": "2.0.0-alpha.10",
4
4
  "type": "module",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
5
+ "main": "dist/node/index.node.js",
6
+ "module": "dist/node/index.node.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "repository": {
9
9
  "type": "git",
@@ -12,36 +12,56 @@
12
12
  "exports": {
13
13
  "./package.json": "./package.json",
14
14
  ".": {
15
- "import": {
16
- "types": "./dist/index.d.ts",
17
- "default": "./dist/index.js"
18
- }
15
+ "types": "./dist/index.d.ts",
16
+ "browser": {
17
+ "types": "./dist/browser/index.d.ts",
18
+ "import": "./dist/browser/index.browser.js",
19
+ "default": "./dist/browser/index.browser.js"
20
+ },
21
+ "node": {
22
+ "types": "./dist/node/index.d.ts",
23
+ "import": "./dist/node/index.node.js",
24
+ "default": "./dist/node/index.node.js"
25
+ },
26
+ "bun": {
27
+ "types": "./dist/node/index.d.ts",
28
+ "default": "./dist/node/index.node.js"
29
+ },
30
+ "require": "./dist/cjs/index.node.cjs",
31
+ "default": "./dist/node/index.node.js"
19
32
  }
20
33
  },
21
34
  "files": [
22
35
  "dist"
23
36
  ],
37
+ "sideEffects": false,
24
38
  "dependencies": {
25
- "@elizaos/core": "^1.6.3",
26
39
  "@google/genai": "^1.5.1",
27
40
  "undici": "^7.9.0"
28
41
  },
29
42
  "devDependencies": {
30
- "prettier": "3.5.3",
31
- "tsup": "8.4.0",
32
- "typescript": "5.8.3",
33
- "vitest": "3.1.3",
34
- "dotenv": "^16.5.0"
43
+ "@biomejs/biome": "^2.3.11",
44
+ "@types/node": "^25.0.3",
45
+ "dotenv": "^17.2.3",
46
+ "typescript": "^5.9.3",
47
+ "@elizaos/core": "2.0.0-alpha.98",
48
+ "vitest": "^4.0.0",
49
+ "@types/bun": "^1.3.11"
35
50
  },
36
51
  "scripts": {
37
- "build": "tsup",
38
- "dev": "tsup --watch",
39
- "lint": "prettier --write ./src",
52
+ "dev": "bun run build.ts --watch",
40
53
  "clean": "rm -rf dist .turbo node_modules .turbo-tsconfig.json tsconfig.tsbuildinfo",
41
- "format": "prettier --write ./src",
42
- "format:check": "prettier --check ./src",
43
- "test": "vitest run",
44
- "test:watch": "vitest"
54
+ "format": "bunx @biomejs/biome format --write .",
55
+ "format:check": "bunx @biomejs/biome format .",
56
+ "typecheck": "tsc --noEmit -p tsconfig.json",
57
+ "test": "bun run test:unit && bun run test:integration",
58
+ "test:unit": "vitest run __tests__/unit/**/*.test.ts --passWithNoTests",
59
+ "test:integration": "vitest run __tests__/integration/**/*.test.ts --passWithNoTests",
60
+ "test:watch": "vitest",
61
+ "lint": "bunx @biomejs/biome check --write --unsafe .",
62
+ "lint:check": "bunx @biomejs/biome check .",
63
+ "build": "bun run build.ts",
64
+ "build:ts": "bun run build.ts"
45
65
  },
46
66
  "publishConfig": {
47
67
  "access": "public"
@@ -105,5 +125,20 @@
105
125
  "sensitive": false
106
126
  }
107
127
  }
128
+ },
129
+ "gitHead": "646c632924826e2b75c2304a75ee56959fe4a460",
130
+ "milady": {
131
+ "platforms": [
132
+ "browser",
133
+ "node"
134
+ ],
135
+ "runtime": "both",
136
+ "platformDetails": {
137
+ "browser": "Browser-compatible build available via exports.browser",
138
+ "node": "Node.js build available via exports.node"
139
+ }
140
+ },
141
+ "peerDependencies": {
142
+ "@elizaos/core": ">=2.0.0-alpha.98 <3.0.0"
108
143
  }
109
144
  }
package/README.md DELETED
@@ -1,65 +0,0 @@
1
- # @elizaos/plugin-google-genai
2
-
3
- Google Generative AI (Gemini) integration for ElizaOS.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @elizaos/plugin-google-genai
9
- ```
10
-
11
- ## Configuration
12
-
13
- 1. Get your Google AI API key from [Google AI Studio](https://aistudio.google.com/)
14
- 2. Set the API key in your environment:
15
-
16
- ```bash
17
- GOOGLE_GENERATIVE_AI_API_KEY=your_api_key_here
18
- ```
19
-
20
- ## Usage
21
-
22
- Add the plugin to your character configuration:
23
-
24
- ```json
25
- {
26
- "plugins": ["@elizaos/plugin-google-genai"]
27
- }
28
- ```
29
-
30
- ## Supported Models
31
-
32
- - **Text Generation**:
33
- - Small: `gemini-2.0-flash-001` (default)
34
- - Large: `gemini-2.0-flash-001` (default)
35
- - **Text Embeddings**: `text-embedding-004` (default)
36
- - **Image Analysis**: `gemini-2.0-flash-001` (default)
37
-
38
- ## Environment Variables
39
-
40
- - `GOOGLE_GENERATIVE_AI_API_KEY` (required): Your Google AI API key
41
- - `GOOGLE_SMALL_MODEL` (optional): Override small model
42
- - `GOOGLE_LARGE_MODEL` (optional): Override large model
43
- - `GOOGLE_IMAGE_MODEL` (optional): Override image model
44
- - `GOOGLE_EMBEDDING_MODEL` (optional): Override embedding model
45
- - `SMALL_MODEL` (optional): Fallback for small model
46
- - `LARGE_MODEL` (optional): Fallback for large model
47
- - `IMAGE_MODEL` (optional): Fallback for image model
48
-
49
- ## Model Types Provided
50
-
51
- - `TEXT_SMALL` - Fast text generation using Gemini Flash
52
- - `TEXT_LARGE` - Complex text generation using Gemini
53
- - `TEXT_EMBEDDING` - Text embeddings for similarity search
54
- - `OBJECT_SMALL` - JSON object generation (small model)
55
- - `OBJECT_LARGE` - Complex JSON object generation (large model)
56
- - `IMAGE_DESCRIPTION` - Image analysis and description
57
-
58
- ## Features
59
-
60
- - Direct integration with Google's Gemini models
61
- - Support for text generation, embeddings, and image analysis
62
- - Configurable safety settings
63
- - Token usage tracking and event emission
64
- - Automatic JSON parsing for object generation
65
- - System instruction support from character configuration