briyah 1.2.3 → 1.2.5
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 +55 -6
- package/data/common/config/image_models.json +160 -97
- package/data/common/config/markup +1 -1
- package/data/common/config/model_prices.json +31 -0
- package/data/common/config/story_models.json +31 -11
- package/data/common/config/story_models_full.json +25 -7
- package/data/common/prompts/character/create_user_character.prompt +3 -12
- package/data/common/prompts/character/introduce_character.json +18 -0
- package/data/common/prompts/character/introduce_character.mock +4 -0
- package/data/common/prompts/character/introduce_character.prompt +58 -0
- package/data/common/prompts/character/perceive.prompt +3 -0
- package/data/common/prompts/character/progress_character.json +8 -4
- package/data/common/prompts/character/progress_character.mock +1 -0
- package/data/common/prompts/character/progress_character.prompt +20 -2
- package/data/common/prompts/character/update_portrait.json +18 -0
- package/data/common/prompts/character/update_portrait.mock +4 -0
- package/data/common/prompts/character/update_portrait.prompt +17 -1
- package/data/common/prompts/narrator/create_simple_plot.json +0 -0
- package/data/common/prompts/narrator/create_simple_plot.mock +13 -0
- package/data/common/prompts/narrator/create_simple_plot.prompt +35 -0
- package/data/common/prompts/narrator/perceive.prompt +12 -9
- package/data/common/prompts/narrator/progress_simple_plot.json +0 -0
- package/data/common/prompts/narrator/progress_simple_plot.mock +13 -0
- package/data/common/prompts/narrator/progress_simple_plot.prompt +40 -0
- package/data/common/prompts/perceive.json +1 -1
- package/data/common/prompts/perceive.prompt +82 -20
- package/data/common/prompts/story_moderator/moderate.json +1 -1
- package/data/common/prompts/story_moderator/moderate.prompt +26 -6
- package/dist-sdk/server/src/ai/LLM/anthropic.service.js +6 -4
- package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +1 -1
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +13 -42
- package/dist-sdk/server/src/ai/LLM/deepseek.service.js +10 -1
- package/dist-sdk/server/src/ai/LLM/fal.service.js +1 -2
- package/dist-sdk/server/src/ai/LLM/googleai.service.js +1 -2
- package/dist-sdk/server/src/ai/LLM/grok.service.js +1 -2
- package/dist-sdk/server/src/ai/LLM/openai.service.js +1 -2
- package/dist-sdk/server/src/ai/LLM/together.service.js +1 -2
- package/dist-sdk/server/src/ai/agent-config.d.ts +2 -0
- package/dist-sdk/server/src/ai/agent-store.service.js +8 -0
- package/dist-sdk/server/src/ai/agent.d.ts +2 -0
- package/dist-sdk/server/src/ai/agent.js +2 -0
- package/dist-sdk/server/src/ai/model_prices.js +2 -1
- package/dist-sdk/server/src/app/user-service-factory.js +7 -3
- package/dist-sdk/server/src/app.controller.d.ts +15 -4
- package/dist-sdk/server/src/app.controller.js +171 -5
- package/dist-sdk/server/src/app.service.d.ts +19 -5
- package/dist-sdk/server/src/app.service.js +50 -4
- package/dist-sdk/server/src/room/message.js +5 -1
- package/dist-sdk/server/src/room/room-factory.d.ts +5 -1
- package/dist-sdk/server/src/room/room-factory.js +6 -1
- package/dist-sdk/server/src/room/room-store.service.d.ts +5 -1
- package/dist-sdk/server/src/room/room-store.service.js +13 -2
- package/dist-sdk/server/src/room/room.d.ts +25 -4
- package/dist-sdk/server/src/room/room.js +393 -96
- package/dist-sdk/server/src/sdk/index.d.ts +1 -1
- package/dist-sdk/server/src/story/story.service.d.ts +5 -4
- package/dist-sdk/server/src/story/story.service.js +207 -120
- package/dist-sdk/server/src/tools/tool-execution.service.d.ts +19 -0
- package/dist-sdk/server/src/tools/tool-execution.service.js +100 -0
- package/dist-sdk/server/src/tools/tool-store.service.d.ts +17 -0
- package/dist-sdk/server/src/tools/tool-store.service.js +143 -0
- package/dist-sdk/shared/types/app.types.d.ts +44 -5
- package/dist-sdk/shared/types/app.types.js +3 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +0 -7
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Agent.html +22 -14
- package/docs/classes/Briyah.html +10 -10
- package/docs/classes/BriyahConfigService.html +5 -5
- package/docs/classes/Room.html +32 -26
- package/docs/classes/RoomMessage.html +10 -10
- package/docs/enums/MessageAction.html +6 -3
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +12 -5
- package/docs/interfaces/AgentInfo.html +3 -2
- package/docs/interfaces/AgentMessagesResponse.html +2 -2
- package/docs/interfaces/AppService.html +184 -149
- package/docs/interfaces/Artifact.html +3 -3
- package/docs/interfaces/ArtifactMetadata.html +2 -2
- package/docs/interfaces/AttachDocumentResponse.html +2 -2
- package/docs/interfaces/BriyahConfigOptions.html +7 -7
- package/docs/interfaces/ChapterInfo.html +2 -2
- package/docs/interfaces/Character.html +2 -2
- package/docs/interfaces/CreateAgentResponse.html +2 -2
- package/docs/interfaces/CreateRoomResponse.html +2 -2
- package/docs/interfaces/CreateStoryResponse.html +2 -2
- package/docs/interfaces/FileList.html +2 -2
- package/docs/interfaces/FileMetadata.html +3 -3
- package/docs/interfaces/IConfigService.html +3 -3
- package/docs/interfaces/LoggingOptions.html +6 -6
- package/docs/interfaces/Message.html +2 -2
- package/docs/interfaces/ModelInfo.html +2 -3
- package/docs/interfaces/PreparedPromptResponse.html +2 -2
- package/docs/interfaces/ProcessTextResponse.html +2 -2
- package/docs/interfaces/PromptFile.html +2 -2
- package/docs/interfaces/PromptFileContent.html +2 -2
- package/docs/interfaces/PromptFilesResponse.html +2 -2
- package/docs/interfaces/PromptFolder.html +2 -2
- package/docs/interfaces/PromptFoldersResponse.html +2 -2
- package/docs/interfaces/RoomDetails.html +2 -2
- package/docs/interfaces/RoomInfo.html +2 -2
- package/docs/interfaces/RoomMessagesResponse.html +2 -2
- package/docs/interfaces/StoryErrorEvent.html +3 -3
- package/docs/interfaces/StoryIdea.html +2 -2
- package/docs/interfaces/StoryInfo.html +5 -4
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +3 -3
- package/docs/interfaces/StoryProgressChapterEvent.html +3 -3
- package/docs/interfaces/StoryState.html +5 -5
- package/docs/interfaces/StoryStateEvent.html +3 -3
- package/docs/interfaces/ToolDefinition.html +6 -0
- package/docs/interfaces/ToolParameter.html +5 -0
- package/docs/interfaces/ToolsResponse.html +2 -0
- package/docs/interfaces/Transaction.html +2 -2
- package/docs/interfaces/TransactionHistoryResponse.html +2 -2
- package/docs/modules.html +1 -1
- package/docs/types/PromptScope.html +1 -1
- package/docs/types/ToolRunResult.html +1 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ Briyah is an SDK for AI agents, multi-agent rooms, and interactive stories. It w
|
|
|
5
5
|
What's in the package:
|
|
6
6
|
|
|
7
7
|
- **Agents.** AI agents with a system prompt, persistent conversation history, attached documents, and per-call cost and token tracking. Histories can be summarized/compacted or cleared.
|
|
8
|
-
- **Rooms.** Multi-agent conversations with a shared goal. Agents exchange messages at different visibility levels (speak, whisper, think, shout),
|
|
8
|
+
- **Rooms.** Multi-agent conversations with a shared goal. Agents exchange messages at different visibility levels (speak, whisper, think, shout), publish shared artifacts, run tools, commission each other for parallel research, and a moderator can route turns.
|
|
9
|
+
- **Tools.** User-defined functions agents can call from a room. A tool is a named async JavaScript function body with declared parameters that returns a JSON value; `helpers.fetch` is available for HTTP requests. Tools are granted per agent, and an agent may chain several tool calls privately before responding. Tool code runs in-process on the server with a timeout — only define tools you trust.
|
|
9
10
|
- **Stories.** Text-based interactive fiction with a narrator, AI-played characters, and a human player. Stories progress through chapters and can introduce new characters mid-game. Story events (state updates, character suggestions, chapter transitions, errors) are delivered through an emitter the host app subscribes to.
|
|
10
11
|
- **Text processing.** One-shot `processText` for non-conversational use, with cost and token counts on the result.
|
|
11
12
|
- **File attachments.** Attach documents to agents as context. Supported file types vary by LLM provider.
|
|
@@ -227,6 +228,13 @@ const room = await appService.createRoom(name, goal, agentIds);
|
|
|
227
228
|
const rooms = await appService.listRooms();
|
|
228
229
|
await appService.sendRoomMessage(roomId, content, sender, action?);
|
|
229
230
|
|
|
231
|
+
// Tool Management
|
|
232
|
+
const tools = await appService.listTools();
|
|
233
|
+
const tool = await appService.createTool({ name, description, parameters, code, timeoutMs? });
|
|
234
|
+
await appService.updateTool(name, tool);
|
|
235
|
+
await appService.deleteTool(name);
|
|
236
|
+
const result = await appService.testTool(name, args); // { ok: true, result } | { ok: false, error }
|
|
237
|
+
|
|
230
238
|
// Story Management
|
|
231
239
|
const story = await appService.createStory(name, idea, userCharacterDesc, otherCharactersDesc, storyModel?);
|
|
232
240
|
await appService.progressStory(storyId);
|
|
@@ -477,6 +485,46 @@ emitter.on('update', (newBalance: number) => {
|
|
|
477
485
|
});
|
|
478
486
|
```
|
|
479
487
|
|
|
488
|
+
### Example 8: Giving Agents Tools
|
|
489
|
+
|
|
490
|
+
Tools let a room agent fetch or compute data mid-conversation. Define the tool once, grant it to specific agents, and the agent invokes it on its own (via the EXECUTE room action) when a conversation calls for it. The result is returned privately to the calling agent, which may chain several calls before speaking.
|
|
491
|
+
|
|
492
|
+
```typescript
|
|
493
|
+
const app = briyah.getAppService('user-123');
|
|
494
|
+
|
|
495
|
+
// 1. Define a tool. `code` is the body of an async function receiving
|
|
496
|
+
// (args, helpers) and returning a JSON-serializable value.
|
|
497
|
+
await app.createTool({
|
|
498
|
+
name: 'weather_lookup',
|
|
499
|
+
description: 'Gets the current temperature for a city',
|
|
500
|
+
parameters: [
|
|
501
|
+
{ name: 'city', type: 'string', description: 'City name', required: true }
|
|
502
|
+
],
|
|
503
|
+
code: `
|
|
504
|
+
const res = await helpers.fetch('https://wttr.in/' + encodeURIComponent(args.city) + '?format=j1');
|
|
505
|
+
const data = await res.json();
|
|
506
|
+
return { tempC: data.current_condition[0].temp_C };
|
|
507
|
+
`,
|
|
508
|
+
timeoutMs: 15000 // optional; default 30s, max 120s
|
|
509
|
+
});
|
|
510
|
+
|
|
511
|
+
// 2. Test it before any agent uses it
|
|
512
|
+
const test = await app.testTool('weather_lookup', { city: 'Paris' });
|
|
513
|
+
if (!test.ok) throw new Error(test.error);
|
|
514
|
+
|
|
515
|
+
// 3. Grant it to an agent (grants are enforced server-side)
|
|
516
|
+
const researcher = app.createAgent('Anthropic', 'Researcher', 'Researcher',
|
|
517
|
+
'A researcher who uses tools for exact answers', 'claude-haiku-4-5');
|
|
518
|
+
researcher.toolNames = ['weather_lookup'];
|
|
519
|
+
researcher.save();
|
|
520
|
+
|
|
521
|
+
// 4. In a room, the agent calls the tool on its own when a question needs it.
|
|
522
|
+
// Other agents wait while it researches; a log-only 'tool' message records
|
|
523
|
+
// each call (visible when fetching messages with includeThoughts=true).
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
Agents can also delegate: an agent may respond with a `commission` action naming other agents, each of which researches independently (using its own tools) and replies with a `deliver`. The commissioner receives all deliverables at once and responds before the conversation continues. No SDK calls are needed for this — it is driven by the agents themselves.
|
|
527
|
+
|
|
480
528
|
## Data Storage
|
|
481
529
|
|
|
482
530
|
Briyah stores data in the following structure:
|
|
@@ -489,13 +537,14 @@ Briyah stores data in the following structure:
|
|
|
489
537
|
│ └── published-agents.json # Published agent mappings
|
|
490
538
|
└── user/
|
|
491
539
|
└── {userId}/ # Per-user data
|
|
540
|
+
├── agents/ # Agent configs and histories (one JSON per agent)
|
|
541
|
+
├── rooms/ # Room metadata, message logs, artifacts (one folder per room)
|
|
542
|
+
├── stories/ # Story state
|
|
543
|
+
├── tools/ # User-defined tools (one JSON per tool)
|
|
492
544
|
├── prompts/ # User-specific prompts
|
|
493
545
|
├── upload/ # User file attachments
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
├── rooms.json # User's rooms
|
|
497
|
-
├── stories.json # User's stories
|
|
498
|
-
└── balance.json # User's balance
|
|
546
|
+
├── transactions/ # Transaction records
|
|
547
|
+
└── userconfig/ # User preferences and balance
|
|
499
548
|
```
|
|
500
549
|
|
|
501
550
|
## Multi-Instance Support
|
|
@@ -1,141 +1,204 @@
|
|
|
1
1
|
[
|
|
2
|
-
{
|
|
3
|
-
"name": "FLUX.1 Kontext (edit)",
|
|
4
|
-
"description": "Image-to-image editing; maintains character consistency",
|
|
5
|
-
"type": "image-to-image",
|
|
6
|
-
"service": "FalAI",
|
|
7
|
-
"model": "fal-ai/flux-pro/kontext/multi",
|
|
8
|
-
"centsPerImage": 4,
|
|
9
|
-
"imageProperties": {
|
|
10
|
-
"aspect_ratio": "1:1",
|
|
11
|
-
"safety_tolerance": "2",
|
|
12
|
-
"num_images": 1,
|
|
13
|
-
"output_format": "png"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
2
|
{
|
|
17
3
|
"name": "FLUX.1 Kontext",
|
|
18
|
-
"description": "",
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
"description": "Maintains character consistency across scenes",
|
|
5
|
+
"generation": {
|
|
6
|
+
"service": "FalAI",
|
|
7
|
+
"model": "fal-ai/flux-pro/kontext/text-to-image",
|
|
8
|
+
"centsPerImage": 4,
|
|
9
|
+
"imageProperties": {
|
|
10
|
+
"aspect_ratio": "1:1",
|
|
11
|
+
"safety_tolerance": "2",
|
|
12
|
+
"num_images": 1,
|
|
13
|
+
"output_format": "png"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"editing": {
|
|
17
|
+
"service": "FalAI",
|
|
18
|
+
"model": "fal-ai/flux-pro/kontext/multi",
|
|
19
|
+
"centsPerImage": 4,
|
|
20
|
+
"imageProperties": {
|
|
21
|
+
"aspect_ratio": "1:1",
|
|
22
|
+
"safety_tolerance": "2",
|
|
23
|
+
"num_images": 1,
|
|
24
|
+
"output_format": "png"
|
|
25
|
+
}
|
|
28
26
|
}
|
|
29
27
|
},
|
|
30
28
|
{
|
|
31
29
|
"name": "GPT Image 1.5",
|
|
32
30
|
"description": "High quality; consistent characters across scenes",
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"imageProperties": {
|
|
51
|
-
"size": "1024x1024"
|
|
31
|
+
"generation": {
|
|
32
|
+
"service": "OpenAI",
|
|
33
|
+
"model": "gpt-image-1.5",
|
|
34
|
+
"centsPerImage": 21,
|
|
35
|
+
"imageProperties": {
|
|
36
|
+
"size": "1024x1024",
|
|
37
|
+
"quality": "auto",
|
|
38
|
+
"moderation": "low"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"editing": {
|
|
42
|
+
"service": "OpenAI",
|
|
43
|
+
"model": "gpt-image-1.5",
|
|
44
|
+
"centsPerImage": 21,
|
|
45
|
+
"imageProperties": {
|
|
46
|
+
"size": "1024x1024"
|
|
47
|
+
}
|
|
52
48
|
}
|
|
53
49
|
},
|
|
54
50
|
{
|
|
55
51
|
"name": "GPT Image 1 Mini",
|
|
56
52
|
"description": "Mediocre quality; some character consistency",
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
53
|
+
"generation": {
|
|
54
|
+
"service": "OpenAI",
|
|
55
|
+
"model": "gpt-image-1-mini",
|
|
56
|
+
"centsPerImage": 10,
|
|
57
|
+
"imageProperties": {
|
|
58
|
+
"size": "1024x1024",
|
|
59
|
+
"quality": "auto",
|
|
60
|
+
"moderation": "low"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"editing": {
|
|
64
|
+
"service": "OpenAI",
|
|
65
|
+
"model": "gpt-image-1-mini",
|
|
66
|
+
"centsPerImage": 10,
|
|
67
|
+
"imageProperties": {
|
|
68
|
+
"size": "1024x1024"
|
|
69
|
+
}
|
|
65
70
|
}
|
|
66
71
|
},
|
|
67
72
|
{
|
|
68
73
|
"name": "FLUX.2 MAX",
|
|
69
74
|
"description": "Cheap",
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
"generation": {
|
|
76
|
+
"service": "TogetherAI",
|
|
77
|
+
"model": "black-forest-labs/FLUX.2-max",
|
|
78
|
+
"centsPerImage": 4,
|
|
79
|
+
"imageProperties": {
|
|
80
|
+
"width": 1024,
|
|
81
|
+
"height": 1024,
|
|
82
|
+
"disable_safety_checker": false,
|
|
83
|
+
"response_format": "base64"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"editing": {
|
|
87
|
+
"service": "TogetherAI",
|
|
88
|
+
"model": "black-forest-labs/FLUX.2-max",
|
|
89
|
+
"centsPerImage": 4,
|
|
90
|
+
"imageProperties": {
|
|
91
|
+
"width": 1024,
|
|
92
|
+
"height": 1024,
|
|
93
|
+
"disable_safety_checker": false,
|
|
94
|
+
"response_format": "base64"
|
|
95
|
+
}
|
|
79
96
|
}
|
|
80
97
|
},
|
|
81
98
|
{
|
|
82
99
|
"name": "Stable Diffusion 3",
|
|
83
100
|
"description": "Laughably poor quality",
|
|
84
|
-
"
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
101
|
+
"generation": {
|
|
102
|
+
"service": "TogetherAI",
|
|
103
|
+
"model": "stabilityai/stable-diffusion-3-medium",
|
|
104
|
+
"centsPerImage": 4,
|
|
105
|
+
"imageProperties": {
|
|
106
|
+
"width": 1024,
|
|
107
|
+
"height": 1024,
|
|
108
|
+
"disable_safety_checker": false,
|
|
109
|
+
"response_format": "base64"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"editing": {
|
|
113
|
+
"service": "FalAI",
|
|
114
|
+
"model": "fal-ai/flux-pro/kontext/multi",
|
|
115
|
+
"centsPerImage": 4,
|
|
116
|
+
"imageProperties": {
|
|
117
|
+
"aspect_ratio": "1:1",
|
|
118
|
+
"safety_tolerance": "2",
|
|
119
|
+
"num_images": 1,
|
|
120
|
+
"output_format": "png"
|
|
121
|
+
}
|
|
93
122
|
}
|
|
94
123
|
},
|
|
95
124
|
{
|
|
96
125
|
"name": "Google Imagen 4",
|
|
97
126
|
"description": "No character consistency",
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
127
|
+
"generation": {
|
|
128
|
+
"service": "GoogleAI",
|
|
129
|
+
"model": "imagen-4.0-generate-001",
|
|
130
|
+
"centsPerImage": 4,
|
|
131
|
+
"imageProperties": {
|
|
132
|
+
"numberOfImages": 1,
|
|
133
|
+
"aspectRatio": "1:1"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"editing": {
|
|
137
|
+
"service": "FalAI",
|
|
138
|
+
"model": "fal-ai/flux-pro/kontext/multi",
|
|
139
|
+
"centsPerImage": 4,
|
|
140
|
+
"imageProperties": {
|
|
141
|
+
"aspect_ratio": "1:1",
|
|
142
|
+
"safety_tolerance": "2",
|
|
143
|
+
"num_images": 1,
|
|
144
|
+
"output_format": "png"
|
|
145
|
+
}
|
|
105
146
|
}
|
|
106
147
|
},
|
|
107
148
|
{
|
|
108
149
|
"name": "Nano Banana Pro",
|
|
109
150
|
"description": "",
|
|
110
|
-
"
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
151
|
+
"generation": {
|
|
152
|
+
"service": "FalAI",
|
|
153
|
+
"model": "fal-ai/nano-banana-pro",
|
|
154
|
+
"centsPerImage": 15,
|
|
155
|
+
"imageProperties": {
|
|
156
|
+
"image_size": { "width": 1024, "height": 1024 },
|
|
157
|
+
"safety_tolerance": "2",
|
|
158
|
+
"num_images": 1,
|
|
159
|
+
"output_format": "png"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"editing": {
|
|
163
|
+
"service": "FalAI",
|
|
164
|
+
"model": "fal-ai/nano-banana-pro",
|
|
165
|
+
"centsPerImage": 15,
|
|
166
|
+
"imageProperties": {
|
|
167
|
+
"image_size": { "width": 1024, "height": 1024 },
|
|
168
|
+
"safety_tolerance": "2",
|
|
169
|
+
"num_images": 1,
|
|
170
|
+
"output_format": "png"
|
|
171
|
+
}
|
|
119
172
|
}
|
|
120
173
|
},
|
|
121
174
|
{
|
|
122
175
|
"name": "Nano Banana",
|
|
123
176
|
"description": "",
|
|
124
|
-
"
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
177
|
+
"generation": {
|
|
178
|
+
"service": "FalAI",
|
|
179
|
+
"model": "fal-ai/nano-banana",
|
|
180
|
+
"centsPerImage": 4,
|
|
181
|
+
"imageProperties": {
|
|
182
|
+
"image_size": { "width": 1024, "height": 1024 },
|
|
183
|
+
"safety_tolerance": "2",
|
|
184
|
+
"num_images": 1,
|
|
185
|
+
"output_format": "png"
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
"editing": {
|
|
189
|
+
"service": "FalAI",
|
|
190
|
+
"model": "fal-ai/nano-banana",
|
|
191
|
+
"centsPerImage": 4,
|
|
192
|
+
"imageProperties": {
|
|
193
|
+
"image_size": { "width": 1024, "height": 1024 },
|
|
194
|
+
"safety_tolerance": "2",
|
|
195
|
+
"num_images": 1,
|
|
196
|
+
"output_format": "png"
|
|
197
|
+
}
|
|
133
198
|
}
|
|
134
199
|
},
|
|
135
200
|
{
|
|
136
201
|
"name": "No images",
|
|
137
|
-
"description": "Disable image generation (no real API calls)"
|
|
138
|
-
"service": "",
|
|
139
|
-
"model": ""
|
|
202
|
+
"description": "Disable image generation (no real API calls)"
|
|
140
203
|
}
|
|
141
204
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
13.132693000000032
|
|
@@ -10214,6 +10214,37 @@
|
|
|
10214
10214
|
},
|
|
10215
10215
|
"supports_output_config": true
|
|
10216
10216
|
},
|
|
10217
|
+
"claude-fable-5": {
|
|
10218
|
+
"cache_creation_input_token_cost": 1.25e-05,
|
|
10219
|
+
"cache_creation_input_token_cost_above_1hr": 2e-05,
|
|
10220
|
+
"cache_read_input_token_cost": 1e-06,
|
|
10221
|
+
"input_cost_per_token": 1e-05,
|
|
10222
|
+
"litellm_provider": "anthropic",
|
|
10223
|
+
"max_input_tokens": 1000000,
|
|
10224
|
+
"max_output_tokens": 128000,
|
|
10225
|
+
"max_tokens": 128000,
|
|
10226
|
+
"mode": "chat",
|
|
10227
|
+
"output_cost_per_token": 5e-05,
|
|
10228
|
+
"search_context_cost_per_query": {
|
|
10229
|
+
"search_context_size_high": 0.01,
|
|
10230
|
+
"search_context_size_low": 0.01,
|
|
10231
|
+
"search_context_size_medium": 0.01
|
|
10232
|
+
},
|
|
10233
|
+
"supports_adaptive_thinking": true,
|
|
10234
|
+
"supports_assistant_prefill": false,
|
|
10235
|
+
"supports_computer_use": true,
|
|
10236
|
+
"supports_function_calling": true,
|
|
10237
|
+
"supports_pdf_input": true,
|
|
10238
|
+
"supports_prompt_caching": true,
|
|
10239
|
+
"supports_reasoning": true,
|
|
10240
|
+
"supports_response_schema": true,
|
|
10241
|
+
"supports_tool_choice": true,
|
|
10242
|
+
"supports_vision": true,
|
|
10243
|
+
"supports_xhigh_reasoning_effort": true,
|
|
10244
|
+
"supports_max_reasoning_effort": true,
|
|
10245
|
+
"supports_native_structured_output": true,
|
|
10246
|
+
"supports_output_config": true
|
|
10247
|
+
},
|
|
10217
10248
|
"claude-opus-4-8": {
|
|
10218
10249
|
"cache_creation_input_token_cost": 6.25e-06,
|
|
10219
10250
|
"cache_creation_input_token_cost_above_1hr": 1e-05,
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
"service": "Anthropic",
|
|
6
6
|
"model": "claude-sonnet-4-6",
|
|
7
7
|
"small_model": "claude-haiku-4-5",
|
|
8
|
+
"moderator_service": "Anthropic",
|
|
9
|
+
"moderator_model": "claude-haiku-4-5",
|
|
8
10
|
"cost": "300"
|
|
9
11
|
},
|
|
10
12
|
{
|
|
@@ -12,30 +14,48 @@
|
|
|
12
14
|
"description": "",
|
|
13
15
|
"service": "Anthropic",
|
|
14
16
|
"model": "claude-haiku-4-5",
|
|
17
|
+
"small_model": "claude-haiku-4-5",
|
|
18
|
+
"moderator_service": "Anthropic",
|
|
19
|
+
"moderator_model": "claude-haiku-4-5",
|
|
15
20
|
"cost": "80"
|
|
16
21
|
},
|
|
17
22
|
{
|
|
18
|
-
"name": "Claude Opus 4.
|
|
23
|
+
"name": "Claude Opus 4.8",
|
|
19
24
|
"description": "Overkill for storytelling",
|
|
20
25
|
"service": "Anthropic",
|
|
21
|
-
"model": "claude-opus-4-
|
|
26
|
+
"model": "claude-opus-4-8",
|
|
22
27
|
"small_model": "claude-haiku-4-5",
|
|
28
|
+
"moderator_service": "Anthropic",
|
|
29
|
+
"moderator_model": "claude-haiku-4-5",
|
|
23
30
|
"cost": "1500"
|
|
24
31
|
},
|
|
25
32
|
{
|
|
26
|
-
"name": "
|
|
33
|
+
"name": "Claude Fable 5",
|
|
34
|
+
"description": "Way overkill for storytelling",
|
|
35
|
+
"service": "Anthropic",
|
|
36
|
+
"model": "claude-fable-5",
|
|
37
|
+
"small_model": "claude-haiku-4-5",
|
|
38
|
+
"moderator_service": "Anthropic",
|
|
39
|
+
"moderator_model": "claude-haiku-4-5",
|
|
40
|
+
"cost": "3000"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Grok 4.3",
|
|
27
44
|
"description": "",
|
|
28
45
|
"service": "Grok",
|
|
29
|
-
"model": "grok-4.
|
|
30
|
-
"
|
|
46
|
+
"model": "grok-4.3",
|
|
47
|
+
"moderator_service": "Grok",
|
|
48
|
+
"moderator_model": "grok-4.3",
|
|
31
49
|
"cost": "300"
|
|
32
50
|
},
|
|
33
51
|
{
|
|
34
|
-
"name": "
|
|
35
|
-
"description": "
|
|
36
|
-
"service": "
|
|
37
|
-
"model": "
|
|
38
|
-
"
|
|
52
|
+
"name": "DeepSeek v4",
|
|
53
|
+
"description": "",
|
|
54
|
+
"service": "DeepSeek",
|
|
55
|
+
"model": "deepseek-v4-pro",
|
|
56
|
+
"small_model": "deepseek-v4-flash",
|
|
57
|
+
"moderator_service": "DeepSeek",
|
|
58
|
+
"moderator_model": "deepseek-v4-flash",
|
|
59
|
+
"cost": "3"
|
|
39
60
|
}
|
|
40
|
-
|
|
41
61
|
]
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
|
-
"name": "Claude Sonnet 4.
|
|
3
|
+
"name": "Claude Sonnet 4.6",
|
|
4
4
|
"description": "Best storyteller, bar none",
|
|
5
5
|
"service": "Anthropic",
|
|
6
|
-
"model": "claude-sonnet-4-
|
|
6
|
+
"model": "claude-sonnet-4-6",
|
|
7
|
+
"small_model": "claude-haiku-4-5",
|
|
7
8
|
"cost": "300"
|
|
8
9
|
},
|
|
9
10
|
{
|
|
@@ -11,15 +12,25 @@
|
|
|
11
12
|
"description": "",
|
|
12
13
|
"service": "Anthropic",
|
|
13
14
|
"model": "claude-haiku-4-5",
|
|
15
|
+
"small_model": "claude-haiku-4-5",
|
|
14
16
|
"cost": "80"
|
|
15
17
|
},
|
|
16
18
|
{
|
|
17
|
-
"name": "Claude Opus 4.
|
|
19
|
+
"name": "Claude Opus 4.8",
|
|
18
20
|
"description": "Overkill for storytelling",
|
|
19
21
|
"service": "Anthropic",
|
|
20
|
-
"model": "claude-opus-4-
|
|
22
|
+
"model": "claude-opus-4-8",
|
|
23
|
+
"small_model": "claude-haiku-4-5",
|
|
21
24
|
"cost": "1500"
|
|
22
25
|
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Claude Fable 5",
|
|
28
|
+
"description": "Way overkill for storytelling",
|
|
29
|
+
"service": "Anthropic",
|
|
30
|
+
"model": "claude-fable-5",
|
|
31
|
+
"small_model": "claude-haiku-4-5",
|
|
32
|
+
"cost": "3000"
|
|
33
|
+
},
|
|
23
34
|
{
|
|
24
35
|
"name": "Qwen",
|
|
25
36
|
"description": "",
|
|
@@ -35,11 +46,18 @@
|
|
|
35
46
|
"cost": "60"
|
|
36
47
|
},
|
|
37
48
|
{
|
|
38
|
-
"name": "Grok 4.
|
|
49
|
+
"name": "Grok 4.3",
|
|
39
50
|
"description": "",
|
|
40
51
|
"service": "Grok",
|
|
41
|
-
"model": "grok-4.
|
|
52
|
+
"model": "grok-4.3",
|
|
42
53
|
"cost": "300"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "DeepSeek v4",
|
|
57
|
+
"description": "",
|
|
58
|
+
"service": "DeepSeek",
|
|
59
|
+
"model": "deepseek-v4-pro",
|
|
60
|
+
"small_model": "deepseek-v4-flash",
|
|
61
|
+
"cost": "3"
|
|
43
62
|
}
|
|
44
|
-
|
|
45
63
|
]
|
|
@@ -22,23 +22,15 @@ Create a detailed character profile that includes:
|
|
|
22
22
|
|
|
23
23
|
2. **Backstory**: A rich history that explains how they became who they are today. Include key life events, relationships, and experiences that shaped them.
|
|
24
24
|
|
|
25
|
-
3. **
|
|
25
|
+
3. **Special Abilities**: Any special abilities or powers that differentiate them from other characters in the story.
|
|
26
26
|
|
|
27
|
-
4. **
|
|
27
|
+
4. **Strengths**: Skills, talents, positive qualities, and what they excel at.
|
|
28
28
|
|
|
29
|
-
5. **
|
|
30
|
-
|
|
31
|
-
6. **Strengths**: Skills, talents, positive qualities, and what they excel at.
|
|
32
|
-
|
|
33
|
-
7. **Weaknesses**: Flaws, vulnerabilities, limitations, and areas where they struggle.
|
|
34
|
-
|
|
35
|
-
8. **Relationships**: How they relate to other characters in the story (if applicable based on the scenario).
|
|
29
|
+
5. **Relationships**: How they relate to other characters in the story (if applicable based on the scenario).
|
|
36
30
|
|
|
37
31
|
**Important Guidelines:**
|
|
38
32
|
- Make the character interesting, complex, and memorable
|
|
39
33
|
- Ensure the character fits naturally within the story's setting and tone
|
|
40
|
-
- Give the character internal conflicts and contradictions that make them feel human
|
|
41
|
-
- Consider how the character's background influences their current behavior
|
|
42
34
|
- Make sure the profile is consistent with the description provided above
|
|
43
35
|
- Leave room for the player to make choices and shape the character's development
|
|
44
36
|
|
|
@@ -68,4 +60,3 @@ Example format:
|
|
|
68
60
|
}
|
|
69
61
|
}
|
|
70
62
|
```
|
|
71
|
-
Note: Do NOT use double-quotes anywhere in the description, character_profile, or inventory; use single-quotes instead.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"name": "introduce_character_response",
|
|
4
|
+
"description": "Response schema for creating a brief profile for a character introduced mid-story",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"description": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "A brief 1-2 sentence description containing only immediately observable physical characteristics"
|
|
10
|
+
},
|
|
11
|
+
"character_profile": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "A short markdown-formatted character profile covering the character's role in the story, what they realistically know, and a brief personality description"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["description", "character_profile"],
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "A friendly newcomer with an unassuming appearance",
|
|
3
|
+
"character_profile": "**Name:** New Character\n\n**Role in the Story:** A local who has just crossed paths with the main characters.\n\n**What They Know:** Only what they have personally seen in their daily routine; they know nothing of the party's secrets.\n\n**Personality:** Curious and talkative, with a plainspoken manner."
|
|
4
|
+
}
|