MCPcopy Create free account
hub / github.com/anomalyco/opencode / generation

Function generation

packages/opencode/src/session/llm/native-request.ts:135–143  ·  view source on GitHub ↗
(input: RequestInput)

Source from the content-addressed store, hash-verified

133 )
134
135const generation = (input: RequestInput) => {
136 const result = {
137 temperature: input.temperature,
138 topP: input.topP,
139 topK: input.topK,
140 maxTokens: input.maxOutputTokens,
141 }
142 return Object.values(result).some((value) => value !== undefined) ? result : undefined
143}
144
145const baseURL = (input: Provider.Model | RequestInput) =>
146 "model" in input ? (input.baseURL ?? (input.model.api.url || undefined)) : input.api.url || undefined

Callers 1

requestFunction · 0.70

Calls 1

valuesMethod · 0.45

Tested by

no test coverage detected