-
Notifications
You must be signed in to change notification settings - Fork 90
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
Can we have an example of adding tools? Such as simply querying the weather. #39
Comments
`function createConfigMessage(): SessionUpdateMessage {
}`I added tools here, but I don't understand how to write it later to make it complete. |
case 'response.function_call_arguments.done':
handleFunctionCall(message)
break async function handleFunctionCall(message: any) {
params = JSON.parse(message.arguments)
let funcName = message.name
if (funcName === 'XXXX') {
console.log('funcName', funcName) // get Data
const data = 'your data'
const msg = {
type: "conversation.item.create",
previous_item_id: message.item_id,
item: {
type: 'message',
role: "user",
content: [{
type: "input_text",
text: `$ {
handle your data
}`,
}],
status: 'completed',
}
}
realtimeStreaming.send(msg)
}
realtimeStreaming.send({
type: "response.create"
})
} |
Thank you, I have been solved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is for a: (mark with an
x
)Minimal steps to reproduce
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Versions
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: