MCPcopy Create free account
hub / github.com/CommandCodeAI/BaseAI / buildModelParams

Function buildModelParams

packages/baseai/src/dev/llms/call-openai.ts:70–95  ·  view source on GitHub ↗
(
	pipe: Pipe,
	stream: boolean,
	messages: Message[]
)

Source from the content-addressed store, hash-verified

68}
69
70function buildModelParams(
71 pipe: Pipe,
72 stream: boolean,
73 messages: Message[]
74): ModelParams {
75 const model = pipe.model.split(':')[1];
76 const {
77 top_p,
78 max_tokens,
79 temperature,
80 presence_penalty,
81 frequency_penalty,
82 stop
83 } = pipe;
84 return {
85 messages,
86 stream,
87 model: model || 'gpt-4o-mini',
88 top_p,
89 max_tokens,
90 temperature,
91 presence_penalty,
92 frequency_penalty,
93 stop
94 };
95}

Callers 1

callOpenAIFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected