@elizaos/plugin-groq 2.0.0-beta.1 → 2.0.3-beta.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.
package/README.md CHANGED
@@ -1,75 +1,80 @@
1
1
  # @elizaos/plugin-groq
2
2
 
3
- Groq LLM plugin for elizaOS - Fast inference with GPT-OSS models.
3
+ Groq LLM plugin for elizaOS fast inference for text generation, audio transcription, and text-to-speech synthesis via Groq's API.
4
4
 
5
- This plugin provides Groq API integration for elizaOS agents, enabling ultra-fast text generation, audio transcription, and text-to-speech synthesis.
5
+ ## What it does
6
6
 
7
- ## Features
7
+ Registers model handlers so any Eliza agent can use Groq as its inference backend. The plugin auto-enables itself whenever `GROQ_API_KEY` is present — no manual registration required.
8
8
 
9
- - 🚀 **Fast Inference** - Leverage Groq's LPU for industry-leading inference speeds
10
- - 📝 **Text Generation** - Generate text with GPT-OSS models
11
- - 🎤 **Audio Transcription** - Transcribe audio with Whisper models
12
- - 🔊 **Text-to-Speech** - Generate speech with PlayAI voices
13
- - 🔢 **Object Generation** - Generate structured JSON objects
14
- - 🎯 **Tokenization** - Tokenize and detokenize text
9
+ Supported capabilities:
15
10
 
16
- ## Installation
11
+ - **Text generation** across five size tiers (nano, small, medium, large, mega) with native tool-calling and structured JSON output
12
+ - **Audio transcription** via `whisper-large-v3-turbo`
13
+ - **Text-to-speech** synthesis (returns `Uint8Array` audio)
14
+ - **Response handler** and **action planner** model roles with tier-appropriate defaults
17
15
 
18
- ### TypeScript/JavaScript (npm)
16
+ ## Installation
19
17
 
20
18
  ```bash
21
- npm install @elizaos/plugin-groq
22
- # or
23
19
  bun add @elizaos/plugin-groq
20
+ # or
21
+ npm install @elizaos/plugin-groq
24
22
  ```
25
- ## Usage
26
23
 
27
- ### TypeScript
24
+ ## Quick start
28
25
 
29
26
  ```typescript
30
27
  import { groqPlugin } from "@elizaos/plugin-groq";
31
28
 
32
- // Add to your agent's plugins
33
- const agent = new Agent({
29
+ // Pass to your agent's plugin list — or set GROQ_API_KEY and let auto-enable handle it.
30
+ const agent = new AgentRuntime({
34
31
  plugins: [groqPlugin],
32
+ // ...
35
33
  });
36
34
  ```
37
- ## Configuration
38
35
 
39
- Set the following environment variables:
40
-
41
- | Variable | Required | Default | Description |
42
- | ------------------ | -------- | -------------------------------- | --------------------- |
43
- | `GROQ_API_KEY` | Yes | - | Your Groq API key |
44
- | `GROQ_BASE_URL` | No | `https://api.groq.com/openai/v1` | Custom API base URL |
45
- | `GROQ_SMALL_MODEL` | No | `openai/gpt-oss-120b` | Model for small tasks |
46
- | `GROQ_LARGE_MODEL` | No | `openai/gpt-oss-120b` | Model for large tasks |
47
- | `GROQ_TTS_MODEL` | No | `canopylabs/orpheus-v1-english` | Text-to-speech model |
48
- | `GROQ_TTS_VOICE` | No | `troy` | TTS voice name |
49
- | `GROQ_TTS_RESPONSE_FORMAT` | No | `wav` | TTS response format |
50
-
51
- ## Model Capabilities
52
-
53
- This plugin provides handlers for the following elizaOS model types:
36
+ ## Configuration
54
37
 
55
- | Model Type | Description |
56
- | ----------------------- | ----------------------------------------------- |
57
- | `TEXT_SMALL` | Fast text + structured output via native tool calling (tools, toolChoice, responseSchema) |
58
- | `TEXT_LARGE` | Capable text + structured output via native tool calling (tools, toolChoice, responseSchema) |
59
- | `TRANSCRIPTION` | Audio transcription with Whisper |
60
- | `TEXT_TO_SPEECH` | Speech synthesis with PlayAI |
61
- | `TEXT_TOKENIZER_ENCODE` | Tokenize text to tokens |
62
- | `TEXT_TOKENIZER_DECODE` | Detokenize tokens to text |
38
+ | Variable | Required | Default | Description |
39
+ |---|---|---|---|
40
+ | `GROQ_API_KEY` | **Yes** | | Groq API key; also triggers auto-enable |
41
+ | `GROQ_BASE_URL` | No | `https://api.groq.com/openai/v1` | Override for proxies |
42
+ | `GROQ_SMALL_MODEL` | No | `openai/gpt-oss-120b` | Model for small/nano/medium tiers |
43
+ | `GROQ_LARGE_MODEL` | No | `openai/gpt-oss-120b` | Model for large/mega tiers |
44
+ | `GROQ_NANO_MODEL` | No | falls back to small | Explicit nano-tier model |
45
+ | `GROQ_MEDIUM_MODEL` | No | falls back to small | Explicit medium-tier model |
46
+ | `GROQ_MEGA_MODEL` | No | falls back to large | Explicit mega-tier model |
47
+ | `GROQ_RESPONSE_HANDLER_MODEL` | No | nano tier | Model for response-handler role |
48
+ | `GROQ_ACTION_PLANNER_MODEL` | No | large tier | Model for action-planner role |
49
+ | `GROQ_TTS_MODEL` | No | `canopylabs/orpheus-v1-english` | Text-to-speech model |
50
+ | `GROQ_TTS_VOICE` | No | `troy` | TTS voice |
51
+ | `GROQ_TTS_RESPONSE_FORMAT` | No | `wav` | TTS audio format |
52
+
53
+ All settings can also be passed via `agentConfig.pluginParameters` in your agent's character file.
54
+
55
+ ## Model types registered
56
+
57
+ | elizaOS model type | Notes |
58
+ |---|---|
59
+ | `TEXT_NANO` | Fastest/cheapest text generation |
60
+ | `TEXT_SMALL` | Small-tier text; supports tools + structured output |
61
+ | `TEXT_MEDIUM` | Medium-tier text |
62
+ | `TEXT_LARGE` | Large-tier text; supports tools + structured output |
63
+ | `TEXT_MEGA` | Mega-tier text |
64
+ | `RESPONSE_HANDLER` | Defaults to nano for low-latency response routing |
65
+ | `ACTION_PLANNER` | Defaults to large for reasoning-heavy planning |
66
+ | `TRANSCRIPTION` | Whisper transcription (Node only) |
67
+ | `TEXT_TO_SPEECH` | Speech synthesis (Node only) |
68
+
69
+ ## Browser support
70
+
71
+ Text generation works in browser contexts when `GROQ_BASE_URL` points to a server-side proxy. `TRANSCRIPTION` and `TEXT_TO_SPEECH` are Node-only and will throw in browser environments. Set `GROQ_ALLOW_BROWSER_API_KEY=true` only if you intentionally want to expose the API key from browser code.
63
72
 
64
73
  ## Development
65
74
 
66
- ### Building from Source
67
-
68
75
  ```bash
69
- # TypeScript
70
- bun install
71
- bun run build
72
- # TypeScript
73
- bun run test
74
- # TypeScript
75
- bun run format:check
76
+ bun run --cwd plugins/plugin-groq build # compile
77
+ bun run --cwd plugins/plugin-groq test # unit tests
78
+ bun run --cwd plugins/plugin-groq typecheck
79
+ bun run --cwd plugins/plugin-groq lint
80
+ ```
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-groq",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.3-beta.2",
4
4
  "type": "module",
5
5
  "main": "dist/node/index.node.js",
6
6
  "module": "dist/node/index.node.js",
7
- "types": "dist/node/index.d.ts",
7
+ "types": "dist/index.d.ts",
8
8
  "browser": "dist/browser/index.browser.js",
9
9
  "repository": {
10
10
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "exports": {
14
14
  "./package.json": "./package.json",
15
15
  ".": {
16
- "types": "./dist/node/index.d.ts",
16
+ "types": "./dist/index.d.ts",
17
17
  "browser": {
18
18
  "types": "./dist/browser/index.d.ts",
19
19
  "import": "./dist/browser/index.browser.js",
@@ -24,14 +24,13 @@
24
24
  "import": "./dist/node/index.node.js",
25
25
  "default": "./dist/node/index.node.js"
26
26
  },
27
- "import": {
28
- "types": "./dist/node/index.d.ts",
29
- "default": "./dist/node/index.node.js"
30
- },
31
- "default": {
32
- "types": "./dist/node/index.d.ts",
33
- "default": "./dist/node/index.node.js"
34
- }
27
+ "default": "./dist/node/index.node.js"
28
+ },
29
+ "./*.css": "./dist/*.css",
30
+ "./*": {
31
+ "types": "./dist/*.d.ts",
32
+ "import": "./dist/*.js",
33
+ "default": "./dist/*.js"
35
34
  }
36
35
  },
37
36
  "sideEffects": false,
@@ -52,7 +51,7 @@
52
51
  },
53
52
  "dependencies": {
54
53
  "@ai-sdk/groq": "^3.0.4",
55
- "@elizaos/core": "2.0.0-beta.1",
54
+ "@elizaos/core": "2.0.3-beta.2",
56
55
  "ai": "^6.0.0"
57
56
  },
58
57
  "devDependencies": {
@@ -64,7 +63,7 @@
64
63
  },
65
64
  "scripts": {
66
65
  "dev": "bun run build.ts --watch",
67
- "typecheck": "tsc --noEmit -p tsconfig.json",
66
+ "typecheck": "tsgo --noEmit -p tsconfig.json",
68
67
  "clean": "rm -rf dist",
69
68
  "format": "bunx @biomejs/biome format --write .",
70
69
  "test": "vitest run --config vitest.config.ts",
@@ -134,5 +133,6 @@
134
133
  "browser": "Browser-compatible build available via exports.browser",
135
134
  "node": "Node.js build available via exports.node"
136
135
  }
137
- }
136
+ },
137
+ "gitHead": "82fe0f44215954c2417328203f5bd6510985c1fc"
138
138
  }