also looking at this
chore(deps): upgrade vendored Stacks framework to 0.70.163
#29
224 files
+3516
-874
| @@ -159,8 +159,15 @@ export async function chat( | ||
| 159 | 159 | temperature, |
| 160 | 160 | topP, |
| 161 | 161 | stop, |
| 162 | responseFormat, | |
| 162 | 163 | } = options |
| 163 | 164 | |
| 165 | const format = responseFormat?.type === 'json_schema' | |
| 166 | ? responseFormat.json_schema.schema | |
| 167 | : responseFormat?.type === 'json_object' | |
| 168 | ? 'json' | |
| 169 | : undefined | |
| 170 | ||
| 164 | 171 | const response = await fetch(`${config.host}/api/chat`, { |
| 165 | 172 | method: 'POST', |
| 166 | 173 | headers: { 'Content-Type': 'application/json' }, |
| @@ -168,6 +175,7 @@ export async function chat( | ||
| 168 | 175 | model, |
| 169 | 176 | messages, |
| 170 | 177 | stream: false, |
| 178 | format, | |
| 171 | 179 | options: { |
| 172 | 180 | temperature, |
| 173 | 181 | top_p: topP, |