feat: implement create-chat-conversation function with OpenAI integration and Supabase support
CI / test (pull_request) Failing after 8s
CI / test (pull_request) Failing after 8s
- Added CORS handling for the create-chat-conversation function. - Implemented health check endpoint for the function. - Created endpoints for managing conversations and messages with OpenAI. - Added error handling and response formatting for better API usability. - Introduced utility functions for environment variable management and Supabase client creation. - Enhanced schema handling for structured responses from OpenAI. - Implemented conversation archiving and retrieval logic.
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
export function mustGetEnv(name: string): string {
|
||||
const v = Deno.env.get(name);
|
||||
if (!v) throw new Error(`Missing env var: ${name}`);
|
||||
return v;
|
||||
}
|
||||
|
||||
export function getEnv(name: string, fallback?: string): string | undefined {
|
||||
return Deno.env.get(name) ?? fallback;
|
||||
}
|
||||
Reference in New Issue
Block a user