-
Notifications
You must be signed in to change notification settings - Fork 1
[Vblocks 4993] conversation relay #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/conversation-relay
Are you sure you want to change the base?
Conversation
9a4ab42
to
2a3af30
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good!
@@ -0,0 +1,18 @@ | |||
(async function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(async function () { | |
(async function() { |
@@ -8,11 +8,12 @@ const authToken = process.env.AUTH_TOKEN; | |||
const callerId = process.env.CALLER_ID; | |||
const callbackBaseUrl = process.env.CALLBACK_BASE_URL; | |||
const defaultIdentity = process.env.DEFAULT_IDENTITY; | |||
const openaiApiKey = process.env.OPENAI_API_KEY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to consider making this one optional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, I guess customers can just put like 'foobar'
here or something.
src/server.js
Outdated
async function aiResponse(messages) { | ||
let completion = await openai.chat.completions.create({ | ||
model: "gpt-4o-mini", | ||
messages: messages, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
messages: messages, | |
messages, |
src/server.js
Outdated
// LLM | ||
const openai = new OpenAI({ apiKey: openaiApiKey }); | ||
async function aiResponse(messages) { | ||
let completion = await openai.chat.completions.create({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let completion = await openai.chat.completions.create({ | |
const completion = await openai.chat.completions.create({ |
Conversation Relay integration
Contributing to Twilio