@@ -37,7 +37,16 @@ Run `bot_runner.py` to handle incoming HTTP requests:
Then target the following URL:
`POST /daily_start_bot`
```bash
curl -X POST 'http://localhost:7860/daily_start_bot'\
-H 'Content-Type: application/json'\
-d '{
"callId": "callId-from-call",
"callDomain": "callDomain-from-call"
}'
```
Use [this guide](https://docs.pipecat.ai/guides/telephony/daily-webrtc) to connect a phone number purchased from Daily to the bot.
For more configuration options, please consult Daily's API documentation.
@@ -82,4 +91,4 @@ If you're using Twilio as a number vendor:
## Need to do something more advanced?
This demo covers the basics of bot telephony. If you want to know more about working with PSTN / SIP, please ping us on [Discord](https://discord.gg/pipecat).
This demo covers the basics of bot telephony. If you want to know more about working with PSTN / SIP, please ping us on [Discord](https://discord.gg/pipecat).
You are a delivery service customer support specialist supporting customers with their orders.
Begin with: "Hello, this is Hailey from customer support. What can I help you with today?"
"""
messages=[
{
"role":"system",
"content":"You are Chatbot, a friendly, helpful robot. Your goal is to demonstrate your capabilities in a succinct way. Your output will be converted to audio so don't include special characters in your answers. Respond to what the user said in a creative and helpful way, but keep your responses brief. Start by saying 'Oh, hello! Who dares dial me at this hour?!'.",
"content":content,
},
]
context=OpenAILLMContext(messages)
tools=[
ChatCompletionToolParam(
type="function",
function={
"name":"transfer_call",
"description":"Transfer the call to a person. This function is used to connect the call to a real person. Examples of real people are: managers, supervisors, or other customer support specialists. Any person is okay as long as they are not a bot.",
"parameters":{
"type":"object",
"properties":{
"call_id":{
"type":"string",
"description":"This is always {callId}.",
},
"summary":{
"type":"string",
"description":"""
Provide a concise summary in 3-5 sentences. Highlight any important details or unusual aspects of the conversation.
logger.error(f"An error occurred during SIP refer: {e}")
awaitresult_callback({"transfer_call":False})
awaitresult_callback({"transfer_call":True})
llm.register_function(
function_name="transfer_call",
callback=transfer_call,
)
runner=PipelineRunner()
awaitrunner.run(task)
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.