refactor(core): simplify system context into a belief model (#34917)
This commit is contained in:
parent
7ec7413fdb
commit
4045041554
40 changed files with 914 additions and 805 deletions
|
|
@ -508,11 +508,13 @@ const lowerThinking = Effect.fn("AnthropicMessages.lowerThinking")(function* (re
|
|||
const thinking = anthropicOptions(request)?.thinking
|
||||
if (!ProviderShared.isRecord(thinking)) return undefined
|
||||
if (thinking.type === "adaptive") {
|
||||
const display = thinking.display
|
||||
return {
|
||||
type: "adaptive" as const,
|
||||
...(display === "summarized" || display === "omitted" ? { display } : {}),
|
||||
}
|
||||
const display =
|
||||
thinking.display === "summarized"
|
||||
? ("summarized" as const)
|
||||
: thinking.display === "omitted"
|
||||
? ("omitted" as const)
|
||||
: undefined
|
||||
return { type: "adaptive" as const, ...(display === undefined ? {} : { display }) }
|
||||
}
|
||||
if (thinking.type === "disabled") return { type: "disabled" as const }
|
||||
if (thinking.type !== "enabled") return undefined
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue