chore: generate
This commit is contained in:
parent
132ef57272
commit
cc52dc396c
20 changed files with 221 additions and 169 deletions
|
|
@ -327,12 +327,18 @@ describe("OpenAI Chat route", () => {
|
|||
Message.tool({
|
||||
id: "call_1",
|
||||
name: "read",
|
||||
result: { type: "content", value: [{ type: "file", uri: "data:image/png;base64,AAEC", mime: "image/png" }] },
|
||||
result: {
|
||||
type: "content",
|
||||
value: [{ type: "file", uri: "data:image/png;base64,AAEC", mime: "image/png" }],
|
||||
},
|
||||
}),
|
||||
Message.tool({
|
||||
id: "call_2",
|
||||
name: "read",
|
||||
result: { type: "content", value: [{ type: "file", uri: "data:image/webp;base64,UklG", mime: "image/webp" }] },
|
||||
result: {
|
||||
type: "content",
|
||||
value: [{ type: "file", uri: "data:image/webp;base64,UklG", mime: "image/webp" }],
|
||||
},
|
||||
}),
|
||||
Message.system("Inspect both images."),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -241,16 +241,12 @@ describe("LLMClient tools", () => {
|
|||
uri: "data:image/png;base64,AAAA",
|
||||
mime: "image/png",
|
||||
})
|
||||
expect(
|
||||
decode({ type: "file", uri: "https://example.test/image.png", mime: "image/png" }),
|
||||
).toEqual({
|
||||
expect(decode({ type: "file", uri: "https://example.test/image.png", mime: "image/png" })).toEqual({
|
||||
type: "file",
|
||||
uri: "https://example.test/image.png",
|
||||
mime: "image/png",
|
||||
})
|
||||
expect(
|
||||
decode({ type: "file", uri: "file:///tmp/image.png", mime: "image/png" }),
|
||||
).toEqual({
|
||||
expect(decode({ type: "file", uri: "file:///tmp/image.png", mime: "image/png" })).toEqual({
|
||||
type: "file",
|
||||
uri: "file:///tmp/image.png",
|
||||
mime: "image/png",
|
||||
|
|
@ -270,9 +266,7 @@ describe("LLMClient tools", () => {
|
|||
})
|
||||
expect(
|
||||
ToolOutput.toResultValue(
|
||||
ToolOutput.make({}, [
|
||||
{ type: "file", uri: "https://example.test/image.png", mime: "image/png" },
|
||||
]),
|
||||
ToolOutput.make({}, [{ type: "file", uri: "https://example.test/image.png", mime: "image/png" }]),
|
||||
),
|
||||
).toEqual({
|
||||
type: "content",
|
||||
|
|
@ -280,9 +274,7 @@ describe("LLMClient tools", () => {
|
|||
})
|
||||
expect(
|
||||
ToolOutput.toResultValue(
|
||||
ToolOutput.make({}, [
|
||||
{ type: "file", uri: "file:///tmp/image.png", mime: "image/png" },
|
||||
]),
|
||||
ToolOutput.make({}, [{ type: "file", uri: "file:///tmp/image.png", mime: "image/png" }]),
|
||||
),
|
||||
).toEqual({
|
||||
type: "content",
|
||||
|
|
@ -307,9 +299,7 @@ describe("LLMClient tools", () => {
|
|||
parameters: Schema.Struct({}),
|
||||
success: Schema.Struct({ ok: Schema.Boolean }),
|
||||
execute: () => Effect.succeed({ ok: true }),
|
||||
toModelOutput: () => [
|
||||
{ type: "file", uri: "https://example.test/image.png", mime: "image/png" },
|
||||
],
|
||||
toModelOutput: () => [{ type: "file", uri: "https://example.test/image.png", mime: "image/png" }],
|
||||
})
|
||||
|
||||
const dispatched = yield* ToolRuntime.dispatch(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue