Function
buildModelParams
(
pipe: Pipe,
stream: boolean,
messages: Message[]
)
Source from the content-addressed store, hash-verified
| 47 | } |
| 48 | |
| 49 | function buildModelParams( |
| 50 | pipe: Pipe, |
| 51 | stream: boolean, |
| 52 | messages: Message[] |
| 53 | ): ModelParams { |
| 54 | const model = pipe.model.split(':')[1]; |
| 55 | const { |
| 56 | top_p, |
| 57 | max_tokens, |
| 58 | temperature, |
| 59 | presence_penalty, |
| 60 | frequency_penalty, |
| 61 | stop |
| 62 | } = pipe; |
| 63 | return { |
| 64 | messages, |
| 65 | stream, |
| 66 | model, |
| 67 | top_p, |
| 68 | max_tokens, |
| 69 | temperature, |
| 70 | presence_penalty, |
| 71 | frequency_penalty, |
| 72 | stop |
| 73 | }; |
| 74 | } |
Tested by
no test coverage detected