mirror of https://github.com/openclaw/openclaw.git
fix: satisfy ollama stream lint follow-up (openclaw#11853) thanks @BrokenFinger98
This commit is contained in:
parent
c1f828e7b2
commit
0a723f98e6
|
|
@ -274,8 +274,11 @@ describe("createOllamaStreamFn", () => {
|
|||
const [url, requestInit] = fetchMock.mock.calls[0] as [string, RequestInit];
|
||||
expect(url).toBe("http://ollama-host:11434/api/chat");
|
||||
expect(requestInit.signal).toBe(signal);
|
||||
if (typeof requestInit.body !== "string") {
|
||||
throw new Error("Expected string request body");
|
||||
}
|
||||
|
||||
const requestBody = JSON.parse(String(requestInit.body)) as {
|
||||
const requestBody = JSON.parse(requestInit.body) as {
|
||||
options: { num_ctx?: number; num_predict?: number };
|
||||
};
|
||||
expect(requestBody.options.num_ctx).toBe(131072);
|
||||
|
|
|
|||
Loading…
Reference in New Issue