Enable automatic web search by default; improve toggle behavior and search planning.
This commit is contained in:
@@ -24,7 +24,12 @@ test("thinking streams separately and survives reload, retry, branch and import"
|
||||
modelApiBaseUrl: "http://fixture", modelRequestTimeoutMs: 1000, modelUnloadAfterMs: 60000
|
||||
}, {
|
||||
fetch: async (_url, options) => {
|
||||
requests.push(JSON.parse(options.body));
|
||||
const body = JSON.parse(options.body);
|
||||
if (body.format?.properties?.search) {
|
||||
const {message} = JSON.parse(body.messages.at(-1).content);
|
||||
return new Response(JSON.stringify({message: {content: JSON.stringify({search: message.includes("latest news"), query: message})}, done: true}));
|
||||
}
|
||||
requests.push(body);
|
||||
const chunks = [
|
||||
'{"message":{"thinking":"Consider "}}\n{"message":{"thi',
|
||||
'nking":"carefully.","content":""}}\n',
|
||||
|
||||
Reference in New Issue
Block a user