mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
🔄 [refactor] Update enhancer API to use OpenAI
- Change import to use streamTextOpenAI instead of streamText
This commit is contained in:
parent
c45414209c
commit
d85f4e907d
@ -1,6 +1,6 @@
|
||||
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
|
||||
import { StreamingTextResponse, parseStreamPart } from 'ai';
|
||||
import { streamText } from '~/lib/.server/llm/stream-text';
|
||||
import { streamTextOpenAI } from '~/lib/.server/llm/stream-text';
|
||||
import { stripIndents } from '~/utils/stripIndent';
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
@ -14,7 +14,7 @@ async function enhancerAction({ context, request }: ActionFunctionArgs) {
|
||||
const { message } = await request.json<{ message: string }>();
|
||||
|
||||
try {
|
||||
const result = await streamText(
|
||||
const result = await streamTextOpenAI(
|
||||
[
|
||||
{
|
||||
role: 'user',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user