feat: add avatar (#47)

This commit is contained in:
Roberto Vidal
2024-08-22 10:11:38 +02:00
committed by GitHub
parent a7b1f5046d
commit b4cfe6ab8b
12 changed files with 104 additions and 85 deletions

View File

@@ -1,14 +1,14 @@
import { type ActionFunctionArgs } from '@remix-run/cloudflare';
import { StreamingTextResponse, parseStreamPart } from 'ai';
import { actionWithAuth } from '~/lib/.server/auth';
import { streamText } from '~/lib/.server/llm/stream-text';
import { handleWithAuth } from '~/lib/.server/login';
import { stripIndents } from '~/utils/stripIndent';
const encoder = new TextEncoder();
const decoder = new TextDecoder();
export async function action(args: ActionFunctionArgs) {
return handleWithAuth(args, enhancerAction);
return actionWithAuth(args, enhancerAction);
}
async function enhancerAction({ context, request }: ActionFunctionArgs) {