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