mirror of
https://github.com/anomalyco/opencode.git
synced 2026-06-01 19:05:38 +00:00
refactor(llm): colocate per-type factories on their namespaces (#26799)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user