randomname
randomname

Reputation: 11

How to add context to chat-gpt twilio customer service bot?

I want to implement langchain to this call-gpt repo so that I can get a twilio phone number to answer company specific questions. How would I go about this?

https://www.twilio.com/en-us/blog/call-gpt-twilio#Configure-your-environment (tutorial used to get twilio gpt number to work) https://github.com/kuschanton/call-gpt (call-gpt repo) https://github.com/techleadhd/chatgpt-retrieval/tree/main (script for retrieving files to use for chatgpt context) (something i found on the side that might help)

Not sure how to go about it.

Upvotes: 0

Views: 187

Answers (1)

IObert
IObert

Reputation: 3816

You can add more context when you modify the completions.create call in /src/functions/prompt.protected:

const completion = await openai.chat.completions.create({
      model: 'gpt-3.5-turbo',
      messages: [
        {'role': 'system', 'content': 'You are a helpful assistant.'},
        // TODO, add more context here
        {'role': 'user', 'content': event.prompt},
      ],
    })

Upvotes: 0

Related Questions