refactor(llm): colocate per-type factories on their namespaces (#26799)

This commit is contained in:
Kit Langton
2026-05-11 13:05:41 -04:00
committed by GitHub
parent 52f7ba7d4d
commit 023e1c711e
13 changed files with 91 additions and 111 deletions

View File

@@ -1,6 +1,6 @@
import { describe, expect } from "bun:test"
import { Effect, Schema, Stream } from "effect"
import { LLM, LLMEvent, LLMRequest, LLMResponse } from "../src"
import { GenerationOptions, LLM, LLMEvent, LLMRequest, LLMResponse, ToolChoice } from "../src"
import { LLMClient } from "../src/route"
import * as AnthropicMessages from "../src/protocols/anthropic-messages"
import * as OpenAIChat from "../src/protocols/openai-chat"
@@ -78,8 +78,8 @@ describe("LLMClient tools", () => {
yield* TestToolRuntime.runTools({
request: LLMRequest.update(baseRequest, {
generation: LLM.generation({ maxTokens: 50 }),
toolChoice: LLM.toolChoice("auto"),
generation: GenerationOptions.make({ maxTokens: 50 }),
toolChoice: ToolChoice.make("auto"),
}),
tools: { get_weather },
}).pipe(Stream.runCollect, Effect.provide(layer))