Function
buildModelParams
(
pipe: Pipe,
stream: boolean,
messages: Message[]
)
Source from the content-addressed store, hash-verified
| 68 | } |
| 69 | |
| 70 | function 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 | } |
Tested by
no test coverage detected