@@ -6324,22 +6324,18 @@ Run a conversation between the agent and a simulated user.
63246324<dd >
63256325
63266326``` python
6327- from elevenlabs import (
6328- AgentConfig,
6329- ConversationSimulationSpecification,
6330- ElevenLabs,
6331- )
6327+ from elevenlabs import ConversationSimulationSpecification, ElevenLabs
63326328
63336329client = ElevenLabs(
63346330 api_key = " YOUR_API_KEY" ,
63356331)
63366332client.conversational_ai.agents.simulate_conversation(
63376333 agent_id = " 21m00Tcm4TlvDq8ikWAM" ,
63386334 simulation_specification = ConversationSimulationSpecification(
6339- simulated_user_config = AgentConfig(
6340- first_message = " Hello, how can I help you today?" ,
6341- language = " en" ,
6342- ) ,
6335+ simulated_user_config = {
6336+ " first_message" : " Hello, how can I help you today?" ,
6337+ " language" : " en" ,
6338+ } ,
63436339 ),
63446340)
63456341
@@ -6420,22 +6416,18 @@ Run a conversation between the agent and a simulated user and stream back the re
64206416<dd >
64216417
64226418``` python
6423- from elevenlabs import (
6424- AgentConfig,
6425- ConversationSimulationSpecification,
6426- ElevenLabs,
6427- )
6419+ from elevenlabs import ConversationSimulationSpecification, ElevenLabs
64286420
64296421client = ElevenLabs(
64306422 api_key = " YOUR_API_KEY" ,
64316423)
64326424client.conversational_ai.agents.simulate_conversation_stream(
64336425 agent_id = " 21m00Tcm4TlvDq8ikWAM" ,
64346426 simulation_specification = ConversationSimulationSpecification(
6435- simulated_user_config = AgentConfig(
6436- first_message = " Hello, how can I help you today?" ,
6437- language = " en" ,
6438- ) ,
6427+ simulated_user_config = {
6428+ " first_message" : " Hello, how can I help you today?" ,
6429+ " language" : " en" ,
6430+ } ,
64396431 ),
64406432)
64416433
@@ -6490,7 +6482,7 @@ client.conversational_ai.agents.simulate_conversation_stream(
64906482</details >
64916483
64926484## ConversationalAi PhoneNumbers
6493- <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >create </a >(... )</code ></summary >
6485+ <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >list </a >()</code ></summary >
64946486<dl >
64956487<dd >
64966488
@@ -6502,7 +6494,7 @@ client.conversational_ai.agents.simulate_conversation_stream(
65026494<dl >
65036495<dd >
65046496
6505- Import Phone Number from provider configuration (Twilio or SIP trunk)
6497+ Retrieve all Phone Numbers
65066498</dd >
65076499</dl >
65086500</dd >
@@ -6518,21 +6510,11 @@ Import Phone Number from provider configuration (Twilio or SIP trunk)
65186510
65196511``` python
65206512from elevenlabs import ElevenLabs
6521- from elevenlabs.conversational_ai.phone_numbers import (
6522- PhoneNumbersCreateRequestBody_Twilio,
6523- )
65246513
65256514client = ElevenLabs(
65266515 api_key = " YOUR_API_KEY" ,
65276516)
6528- client.conversational_ai.phone_numbers.create(
6529- request = PhoneNumbersCreateRequestBody_Twilio(
6530- phone_number = " phone_number" ,
6531- label = " label" ,
6532- sid = " sid" ,
6533- token = " token" ,
6534- ),
6535- )
6517+ client.conversational_ai.phone_numbers.list()
65366518
65376519```
65386520</dd >
@@ -6548,14 +6530,6 @@ client.conversational_ai.phone_numbers.create(
65486530<dl >
65496531<dd >
65506532
6551- ** request:** ` PhoneNumbersCreateRequestBody `
6552-
6553- </dd >
6554- </dl >
6555-
6556- <dl >
6557- <dd >
6558-
65596533** request_options:** ` typing.Optional[RequestOptions] ` — Request-specific configuration.
65606534
65616535</dd >
@@ -6568,7 +6542,7 @@ client.conversational_ai.phone_numbers.create(
65686542</dl >
65696543</details >
65706544
6571- <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >get </a >(...)</code ></summary >
6545+ <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >create </a >(...)</code ></summary >
65726546<dl >
65736547<dd >
65746548
@@ -6580,7 +6554,7 @@ client.conversational_ai.phone_numbers.create(
65806554<dl >
65816555<dd >
65826556
6583- Retrieve Phone Number details by ID
6557+ Import Phone Number from provider configuration (Twilio or SIP trunk)
65846558</dd >
65856559</dl >
65866560</dd >
@@ -6596,12 +6570,20 @@ Retrieve Phone Number details by ID
65966570
65976571``` python
65986572from elevenlabs import ElevenLabs
6573+ from elevenlabs.conversational_ai.phone_numbers import (
6574+ PhoneNumbersCreateRequestBody_Twilio,
6575+ )
65996576
66006577client = ElevenLabs(
66016578 api_key = " YOUR_API_KEY" ,
66026579)
6603- client.conversational_ai.phone_numbers.get(
6604- phone_number_id = " TeaqRRdTcIfIu2i7BYfT" ,
6580+ client.conversational_ai.phone_numbers.create(
6581+ request = PhoneNumbersCreateRequestBody_Twilio(
6582+ phone_number = " phone_number" ,
6583+ label = " label" ,
6584+ sid = " sid" ,
6585+ token = " token" ,
6586+ ),
66056587)
66066588
66076589```
@@ -6618,7 +6600,7 @@ client.conversational_ai.phone_numbers.get(
66186600<dl >
66196601<dd >
66206602
6621- ** phone_number_id :** ` str ` — The id of an agent. This is returned on agent creation.
6603+ ** request :** ` PhoneNumbersCreateRequestBody `
66226604
66236605</dd >
66246606</dl >
@@ -6638,7 +6620,7 @@ client.conversational_ai.phone_numbers.get(
66386620</dl >
66396621</details >
66406622
6641- <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >delete </a >(...)</code ></summary >
6623+ <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >get </a >(...)</code ></summary >
66426624<dl >
66436625<dd >
66446626
@@ -6650,7 +6632,7 @@ client.conversational_ai.phone_numbers.get(
66506632<dl >
66516633<dd >
66526634
6653- Delete Phone Number by ID
6635+ Retrieve Phone Number details by ID
66546636</dd >
66556637</dl >
66566638</dd >
@@ -6670,7 +6652,7 @@ from elevenlabs import ElevenLabs
66706652client = ElevenLabs(
66716653 api_key = " YOUR_API_KEY" ,
66726654)
6673- client.conversational_ai.phone_numbers.delete (
6655+ client.conversational_ai.phone_numbers.get (
66746656 phone_number_id = " TeaqRRdTcIfIu2i7BYfT" ,
66756657)
66766658
@@ -6708,7 +6690,7 @@ client.conversational_ai.phone_numbers.delete(
67086690</dl >
67096691</details >
67106692
6711- <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >update </a >(...)</code ></summary >
6693+ <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >delete </a >(...)</code ></summary >
67126694<dl >
67136695<dd >
67146696
@@ -6720,7 +6702,7 @@ client.conversational_ai.phone_numbers.delete(
67206702<dl >
67216703<dd >
67226704
6723- Update Phone Number details by ID
6705+ Delete Phone Number by ID
67246706</dd >
67256707</dl >
67266708</dd >
@@ -6740,7 +6722,7 @@ from elevenlabs import ElevenLabs
67406722client = ElevenLabs(
67416723 api_key = " YOUR_API_KEY" ,
67426724)
6743- client.conversational_ai.phone_numbers.update (
6725+ client.conversational_ai.phone_numbers.delete (
67446726 phone_number_id = " TeaqRRdTcIfIu2i7BYfT" ,
67456727)
67466728
@@ -6766,14 +6748,6 @@ client.conversational_ai.phone_numbers.update(
67666748<dl >
67676749<dd >
67686750
6769- ** agent_id:** ` typing.Optional[str] `
6770-
6771- </dd >
6772- </dl >
6773-
6774- <dl >
6775- <dd >
6776-
67776751** request_options:** ` typing.Optional[RequestOptions] ` — Request-specific configuration.
67786752
67796753</dd >
@@ -6786,7 +6760,7 @@ client.conversational_ai.phone_numbers.update(
67866760</dl >
67876761</details >
67886762
6789- <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >list </a >()</code ></summary >
6763+ <details ><summary ><code >client.conversational_ai.phone_numbers.<a href =" src/elevenlabs/conversational_ai/phone_numbers/client.py " >update </a >(... )</code ></summary >
67906764<dl >
67916765<dd >
67926766
@@ -6798,7 +6772,7 @@ client.conversational_ai.phone_numbers.update(
67986772<dl >
67996773<dd >
68006774
6801- Retrieve all Phone Numbers
6775+ Update Phone Number details by ID
68026776</dd >
68036777</dl >
68046778</dd >
@@ -6818,7 +6792,9 @@ from elevenlabs import ElevenLabs
68186792client = ElevenLabs(
68196793 api_key = " YOUR_API_KEY" ,
68206794)
6821- client.conversational_ai.phone_numbers.list()
6795+ client.conversational_ai.phone_numbers.update(
6796+ phone_number_id = " TeaqRRdTcIfIu2i7BYfT" ,
6797+ )
68226798
68236799```
68246800</dd >
@@ -6834,6 +6810,22 @@ client.conversational_ai.phone_numbers.list()
68346810<dl >
68356811<dd >
68366812
6813+ ** phone_number_id:** ` str ` — The id of an agent. This is returned on agent creation.
6814+
6815+ </dd >
6816+ </dl >
6817+
6818+ <dl >
6819+ <dd >
6820+
6821+ ** agent_id:** ` typing.Optional[str] `
6822+
6823+ </dd >
6824+ </dl >
6825+
6826+ <dl >
6827+ <dd >
6828+
68376829** request_options:** ` typing.Optional[RequestOptions] ` — Request-specific configuration.
68386830
68396831</dd >
0 commit comments