chore: generate
This commit is contained in:
@@ -225,10 +225,7 @@ const lowerToolSpec = (tool: ToolDefinition): BedrockToolSpec => ({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const lowerTools = (
|
const lowerTools = (breakpoints: BedrockCache.Breakpoints, tools: ReadonlyArray<ToolDefinition>): BedrockTool[] => {
|
||||||
breakpoints: BedrockCache.Breakpoints,
|
|
||||||
tools: ReadonlyArray<ToolDefinition>,
|
|
||||||
): BedrockTool[] => {
|
|
||||||
const result: BedrockTool[] = []
|
const result: BedrockTool[] = []
|
||||||
for (const tool of tools) {
|
for (const tool of tools) {
|
||||||
result.push(lowerToolSpec(tool))
|
result.push(lowerToolSpec(tool))
|
||||||
|
|||||||
@@ -464,9 +464,7 @@ describe("Bedrock Converse route", () => {
|
|||||||
const prepared = yield* LLMClient.prepare(
|
const prepared = yield* LLMClient.prepare(
|
||||||
LLM.request({
|
LLM.request({
|
||||||
model,
|
model,
|
||||||
tools: [
|
tools: [{ name: "lookup", description: "lookup", inputSchema: { type: "object", properties: {} }, cache }],
|
||||||
{ name: "lookup", description: "lookup", inputSchema: { type: "object", properties: {} }, cache },
|
|
||||||
],
|
|
||||||
messages: [
|
messages: [
|
||||||
LLM.user("What's the weather?"),
|
LLM.user("What's the weather?"),
|
||||||
LLM.assistant([LLM.toolCall({ id: "call_1", name: "lookup", input: {} })]),
|
LLM.assistant([LLM.toolCall({ id: "call_1", name: "lookup", input: {} })]),
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ export const weatherToolName = "get_weather"
|
|||||||
// a fixed sentence — the cassette replays bit-for-bit, so the exact text matters
|
// a fixed sentence — the cassette replays bit-for-bit, so the exact text matters
|
||||||
// only when re-recording with `RECORD=true`.
|
// only when re-recording with `RECORD=true`.
|
||||||
export const LARGE_CACHEABLE_SYSTEM = (() => {
|
export const LARGE_CACHEABLE_SYSTEM = (() => {
|
||||||
const sentence =
|
const sentence = "You are a concise, factual assistant. Answer precisely and avoid filler. Cite numbers when known. "
|
||||||
"You are a concise, factual assistant. Answer precisely and avoid filler. Cite numbers when known. "
|
|
||||||
// ~100 chars per sentence × 250 repeats ≈ 25,000 chars ≈ 5k+ tokens, safely
|
// ~100 chars per sentence × 250 repeats ≈ 25,000 chars ≈ 5k+ tokens, safely
|
||||||
// above every provider's threshold.
|
// above every provider's threshold.
|
||||||
return sentence.repeat(250)
|
return sentence.repeat(250)
|
||||||
|
|||||||
Reference in New Issue
Block a user