Skip to content

Commit 527f649

Browse files
Merge branch 'main' of https://github.com/yodamaster726/eliza into yodamaster726-main
2 parents 464377e + d0aed6d commit 527f649

18 files changed

+4893
-69
lines changed

.env.example

+2-1
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,5 @@ STARKNET_ADDRESS=
9191
STARKNET_PRIVATE_KEY=
9292
STARKNET_RPC_URL=
9393

94-
94+
# Coinbase Commerce
95+
COINBASE_COMMERCE_KEY=

agent/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"@ai16z/plugin-node": "workspace:*",
2626
"@ai16z/plugin-solana": "workspace:*",
2727
"@ai16z/plugin-starknet": "workspace:*",
28+
"@ai16z/plugin-coinbase": "workspace:*",
2829
"readline": "^1.3.0",
2930
"ws": "^8.18.0",
3031
"yargs": "17.7.2"

agent/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
import { bootstrapPlugin } from "@ai16z/plugin-bootstrap";
2626
import { solanaPlugin } from "@ai16z/plugin-solana";
2727
import { nodePlugin } from "@ai16z/plugin-node";
28+
import { coinbaseCommercePlugin } from "@ai16z/plugin-coinbase";
2829
import Database from "better-sqlite3";
2930
import fs from "fs";
3031
import readline from "readline";
@@ -249,6 +250,10 @@ export function createAgent(
249250
bootstrapPlugin,
250251
nodePlugin,
251252
character.settings.secrets?.WALLET_PUBLIC_KEY ? solanaPlugin : null,
253+
character.settings.secrets?.COINBASE_COMMERCE_KEY ||
254+
process.env.COINBASE_COMMERCE_KEY
255+
? coinbaseCommercePlugin
256+
: null,
252257
].filter(Boolean),
253258
providers: [],
254259
actions: [],

docs/docs/packages/plugins.md

+105
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,111 @@ const character = {
106106
};
107107
```
108108

109+
Here is the updated README with the Coinbase Commerce plugin information added:
110+
111+
---
112+
113+
# 🧩 Plugins
114+
115+
## Overview
116+
117+
Eliza's plugin system provides a modular way to extend the core functionality with additional features, actions, evaluators, and providers. Plugins are self-contained modules that can be easily added or removed to customize your agent's capabilities.
118+
119+
## Core Plugin Concepts
120+
121+
### Plugin Structure
122+
123+
Each plugin in Eliza must implement the `Plugin` interface with the following properties:
124+
125+
```typescript
126+
interface Plugin {
127+
name: string; // Unique identifier for the plugin
128+
description: string; // Brief description of plugin functionality
129+
actions?: Action[]; // Custom actions provided by the plugin
130+
evaluators?: Evaluator[]; // Custom evaluators for behavior assessment
131+
providers?: Provider[]; // Context providers for message generation
132+
services?: Service[]; // Additional services (optional)
133+
}
134+
```
135+
136+
### Available Plugins
137+
138+
#### 1. Bootstrap Plugin (`@eliza/plugin-bootstrap`)
139+
140+
The bootstrap plugin provides essential baseline functionality:
141+
142+
**Actions:**
143+
144+
- `continue` - Continue the current conversation flow
145+
- `followRoom` - Follow a room for updates
146+
- `unfollowRoom` - Unfollow a room
147+
- `ignore` - Ignore specific messages
148+
- `muteRoom` - Mute notifications from a room
149+
- `unmuteRoom` - Unmute notifications from a room
150+
151+
**Evaluators:**
152+
153+
- `fact` - Evaluate factual accuracy
154+
- `goal` - Assess goal completion
155+
156+
**Providers:**
157+
158+
- `boredom` - Manages engagement levels
159+
- `time` - Provides temporal context
160+
- `facts` - Supplies factual information
161+
162+
#### 2. Image Generation Plugin (`@eliza/plugin-image-generation`)
163+
164+
Enables AI image generation capabilities:
165+
166+
**Actions:**
167+
168+
- `GENERATE_IMAGE` - Create images based on text descriptions
169+
- Supports multiple image generation services (Anthropic, Together)
170+
- Auto-generates captions for created images
171+
172+
#### 3. Node Plugin (`@eliza/plugin-node`)
173+
174+
Provides core Node.js-based services:
175+
176+
**Services:**
177+
178+
- `BrowserService` - Web browsing capabilities
179+
- `ImageDescriptionService` - Image analysis
180+
- `LlamaService` - LLM integration
181+
- `PdfService` - PDF processing
182+
- `SpeechService` - Text-to-speech
183+
- `TranscriptionService` - Speech-to-text
184+
- `VideoService` - Video processing
185+
186+
#### 4. Solana Plugin (`@eliza/plugin-solana`)
187+
188+
Integrates Solana blockchain functionality:
189+
190+
**Evaluators:**
191+
192+
- `trustEvaluator` - Assess transaction trust scores
193+
194+
**Providers:**
195+
196+
- `walletProvider` - Wallet management
197+
- `trustScoreProvider` - Transaction trust metrics
198+
199+
#### 5. Coinbase Commerce Plugin (`@eliza/plugin-coinbase-commerce`)
200+
201+
Integrates Coinbase Commerce for payment and transaction management:
202+
203+
**Actions:**
204+
205+
- `CREATE_CHARGE` - Create a payment charge using Coinbase Commerce
206+
- `GET_ALL_CHARGES` - Fetch all payment charges
207+
- `GET_CHARGE_DETAILS` - Retrieve details for a specific charge
208+
209+
**Description:**
210+
This plugin enables Eliza to interact with the Coinbase Commerce API to create and manage payment charges, providing seamless integration with cryptocurrency-based payment systems.
211+
212+
---
213+
109214
### Writing Custom Plugins
110215

111216
Create a new plugin by implementing the Plugin interface:

packages/core/src/defaultCharacter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export const defaultCharacter: Character = {
55
username: "eliza",
66
plugins: [],
77
clients: [],
8-
modelProvider: ModelProviderName.OPENAI,
8+
modelProvider: ModelProviderName.OLLAMA,
99
settings: {
1010
secrets: {},
1111
voice: {

packages/core/src/generation.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,9 @@ export const generateObjectV2 = async ({
944944

945945
const provider = runtime.modelProvider;
946946
const model = models[provider].model[modelClass];
947+
if (!model) {
948+
throw new Error(`Unsupported model class: ${modelClass}`);
949+
}
947950
const temperature = models[provider].settings.temperature;
948951
const frequency_penalty = models[provider].settings.frequency_penalty;
949952
const presence_penalty = models[provider].settings.presence_penalty;
@@ -952,7 +955,7 @@ export const generateObjectV2 = async ({
952955
const apiKey = runtime.token;
953956

954957
try {
955-
context = await trimTokens(context, max_context_length, modelClass);
958+
context = await trimTokens(context, max_context_length, "gpt-4o");
956959

957960
const modelOptions: ModelSettings = {
958961
prompt: context,

packages/plugin-coinbase/.npmignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
*
2+
3+
!dist/**
4+
!package.json
5+
!readme.md
6+
!tsup.config.ts

0 commit comments

Comments
 (0)