-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use normalized tool_choice value in prompt -> sdk conversion
- Loading branch information
1 parent
cebb5cc
commit 07b1207
Showing
8 changed files
with
202 additions
and
141 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { PromptVersion } from "../../../src/types/prompts"; | ||
|
||
export const BASE_MOCK_PROMPT_VERSION = { | ||
id: "test", | ||
description: "Test prompt", | ||
model_provider: "openai", | ||
model_name: "gpt-4", | ||
template_type: "CHAT", | ||
template_format: "MUSTACHE", | ||
template: { | ||
version: "chat-template-v1", | ||
messages: [ | ||
{ | ||
role: "USER", | ||
content: [{ type: "text", text: { text: "Hello" } }], | ||
}, | ||
], | ||
}, | ||
invocation_parameters: { | ||
temperature: 0.7, | ||
}, | ||
} satisfies Partial<PromptVersion>; | ||
|
||
export const BASE_MOCK_PROMPT_VERSION_TOOLS = { | ||
tools: { | ||
type: "tools-v1", | ||
tool_choice: { type: "zero-or-more" }, | ||
tools: [ | ||
{ | ||
type: "function-tool-v1", | ||
name: "test", | ||
description: "test function", | ||
schema: { | ||
type: "json-schema-draft-7-object-schema", | ||
json: { | ||
type: "object", | ||
properties: {}, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
} satisfies Partial<PromptVersion>; | ||
|
||
export const BASE_MOCK_PROMPT_VERSION_RESPONSE_FORMAT = { | ||
response_format: { | ||
type: "response-format-json-schema-v1", | ||
name: "test", | ||
description: "test function", | ||
schema: { | ||
type: "json-schema-draft-7-object-schema", | ||
json: { | ||
type: "object", | ||
properties: {}, | ||
}, | ||
}, | ||
extra_parameters: {}, | ||
}, | ||
} satisfies Partial<PromptVersion>; |
Oops, something went wrong.