(
c: TextContext,
prompt: string,
model: string,
body: Record<string, unknown> = {},
)
| 384 | } |
| 385 | |
| 386 | export async function handleSimpleTextLocal( |
| 387 | c: TextContext, |
| 388 | prompt: string, |
| 389 | model: string, |
| 390 | body: Record<string, unknown> = {}, |
| 391 | ): Promise<Response> { |
| 392 | const req = createExpressLikeRequest(c, body, c.req.path, { |
| 393 | ...c.req.param(), |
| 394 | 0: prompt, |
| 395 | }); |
| 396 | const requestData = prepareRequestParameters( |
| 397 | { |
| 398 | ...getRequestData(req), |
| 399 | model, |
| 400 | }, |
| 401 | c.var.model.definition, |
| 402 | ); |
| 403 | return generateTextResponse(c, requestData, true); |
| 404 | } |
no test coverage detected