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