Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
rschwabco committed Jan 25, 2024
1 parent 108d076 commit 62c9707
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/app/api/chat/route.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Configuration, OpenAIApi } from 'openai-edge'
import { Message, OpenAIStream, StreamingTextResponse, experimental_StreamData } from 'ai'
import { Metadata, getContext } from '@/services/context'
import { PineconeRecord, ScoredVector } from '@pinecone-database/pinecone'
import type { PineconeRecord } from '@pinecone-database/pinecone'
import { Message, OpenAIStream, StreamingTextResponse, experimental_StreamData } from 'ai'
import { Configuration, OpenAIApi } from 'openai-edge'


// Create an OpenAI API client (that's edge friendly!)
const config = new Configuration({
Expand All @@ -16,8 +17,6 @@ export async function POST(req: Request) {
try {

const { messages, withContext, messageId } = await req.json()
console.log("messageId", messageId)

// Get the last message
const lastMessage = messages[messages.length - 1]

Expand Down

0 comments on commit 62c9707

Please sign in to comment.