Skip to content

LLM Wiki is a cross-platform desktop application that turns your documents into an organized, interlinked knowledge base — automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources。

TypeScript
562 B
Raw Blame
import { describe, expect, it } from "vitest"
import { parseExtraRequestBody } from "./llm-provider-section"

describe("parseExtraRequestBody", () => {
  it("accepts an object and treats blank input as disabled", () => {
    expect(parseExtraRequestBody('{"enable_thinking":false}')).toEqual({ enable_thinking: false })
    expect(parseExtraRequestBody("  ")).toBeUndefined()
  })

  it("rejects arrays and invalid JSON", () => {
    expect(() => parseExtraRequestBody("[]")).toThrow(/JSON object/)
    expect(() => parseExtraRequestBody("{")).toThrow()
  })
})