chore(vendor): import pi 1.3.0
Imported as a linear vendor commit so forge rebases do not replay the upstream root tree. git-subtree-dir: third_party/pi git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
1 parent
719370c8f7
commit
6081e3e325
1743 files changed
+205459
-131704
No files matched your search
@@ -2,12 +2,13 @@ import { Type } from "typebox";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { stream, streamSimple } from "../src/api/azure-openai-responses.ts";
|
||||
import type { Model } from "../src/types.ts";
|
||||
import { normalizeContext } from "../src/utils/transcript.ts";
|
||||
|
||||
const model: Model<"azure-openai-responses"> = {
|
||||
id: "test-deployment",
|
||||
name: "Test Deployment",
|
||||
api: "azure-openai-responses",
|
||||
provider: "azure-openai-responses",
|
||||
provider: "azure",
|
||||
baseUrl: "http://127.0.0.1:9/openai/v1",
|
||||
reasoning: false,
|
||||
input: ["text"],
|
||||
@@ -21,7 +22,7 @@ describe("Azure OpenAI tool choice", () => {
|
||||
let payload: unknown;
|
||||
const result = stream(
|
||||
model,
|
||||
{
|
||||
normalizeContext({
|
||||
messages: [{ role: "user", content: "Summarize this", timestamp: 1 }],
|
||||
tools: [
|
||||
{
|
||||
@@ -30,7 +31,7 @@ describe("Azure OpenAI tool choice", () => {
|
||||
parameters: Type.Object({ path: Type.String() }),
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
{
|
||||
apiKey: "test-key",
|
||||
toolChoice: "required",
|
||||
@@ -51,7 +52,7 @@ describe("Azure OpenAI tool choice", () => {
|
||||
let payload: unknown;
|
||||
const result = streamSimple(
|
||||
model,
|
||||
{
|
||||
normalizeContext({
|
||||
messages: [{ role: "user", content: "Summarize this", timestamp: 1 }],
|
||||
tools: [
|
||||
{
|
||||
@@ -60,7 +61,7 @@ describe("Azure OpenAI tool choice", () => {
|
||||
parameters: Type.Object({ path: Type.String() }),
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
{
|
||||
apiKey: "test-key",
|
||||
toolChoice: "none",
|
||||
|
||||
Reference in new issue
Block a user