Skip to content

Commit 335c293

Browse files
committed
support endpointUrl
1 parent 94a757e commit 335c293

File tree

1 file changed

+4
-2
lines changed
  • packages/tiny-agents/src

1 file changed

+4
-2
lines changed

packages/tiny-agents/src/cli.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ async function main() {
116116

117117
const ConfigSchema = z.object({
118118
model: z.string(),
119-
provider: z.enum(PROVIDERS_OR_POLICIES),
119+
provider: z.enum(PROVIDERS_OR_POLICIES).optional(),
120+
endpointUrl: z.string().optional(),
120121
servers: z.array(ServerConfigSchema),
121122
});
122123

@@ -131,8 +132,9 @@ async function main() {
131132

132133
const agent = new Agent({
133134
provider: config.provider,
135+
endpointUrl: config.endpointUrl,
134136
model: config.model,
135-
apiKey: process.env.HF_TOKEN ?? "",
137+
apiKey: process.env.HF_TOKEN,
136138
servers: config.servers,
137139
prompt,
138140
});

0 commit comments

Comments
 (0)