mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-27 09:26:23 +02:00
allow provider / model config
This commit is contained in:
parent
62caa0c8b6
commit
6251c8f007
9 changed files with 140 additions and 12 deletions
|
|
@ -27,7 +27,8 @@ export const AgentTool = z.discriminatedUnion("type", [
|
|||
|
||||
export const Agent = z.object({
|
||||
name: z.string(),
|
||||
model: z.string(),
|
||||
provider: z.string().optional(),
|
||||
model: z.string().optional(),
|
||||
description: z.string(),
|
||||
instructions: z.string(),
|
||||
tools: z.record(z.string(), AgentTool).optional(),
|
||||
|
|
|
|||
15
apps/cli/src/application/entities/models.ts
Normal file
15
apps/cli/src/application/entities/models.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import z from "zod";
|
||||
|
||||
export const Provider = z.object({
|
||||
flavor: z.enum(["openai", "anthropic", "google"]),
|
||||
apiKey: z.string().optional(),
|
||||
baseURL: z.string().optional(),
|
||||
});
|
||||
|
||||
export const ModelConfig = z.object({
|
||||
providers: z.record(z.string(), Provider),
|
||||
defaults: z.object({
|
||||
provider: z.string(),
|
||||
model: z.string(),
|
||||
}),
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue