|
24 | 24 |
|
25 | 25 |
|
26 | 26 | class LiveRequest(BaseModel): |
27 | | - """Request send to live agents.""" |
| 27 | + """Request send to live agents. |
| 28 | +
|
| 29 | + When multiple fields are set, they are processed by priority (highest first): |
| 30 | + activity_start > activity_end > audio_stream_end > blob > content. |
| 31 | + """ |
28 | 32 |
|
29 | 33 | model_config = ConfigDict(ser_json_bytes='base64', val_json_bytes='base64') |
30 | 34 | """The pydantic model config.""" |
31 | 35 |
|
32 | 36 | content: Optional[types.Content] = None |
33 | | - """If set, send the content to the model in turn-by-turn mode. |
34 | | -
|
35 | | - When multiple fields are set, they are processed by priority (highest first): |
36 | | - activity_start > activity_end > blob > content. |
37 | | - """ |
| 37 | + """If set, send the content to the model in turn-by-turn mode.""" |
38 | 38 | blob: Optional[types.Blob] = None |
39 | | - """If set, send the blob to the model in realtime mode. |
40 | | -
|
41 | | - When multiple fields are set, they are processed by priority (highest first): |
42 | | - activity_start > activity_end > blob > content. |
43 | | - """ |
| 39 | + """If set, send the blob to the model in realtime mode.""" |
44 | 40 | activity_start: Optional[types.ActivityStart] = None |
45 | | - """If set, signal the start of user activity to the model. |
46 | | -
|
47 | | - When multiple fields are set, they are processed by priority (highest first): |
48 | | - activity_start > activity_end > blob > content. |
49 | | - """ |
| 41 | + """If set, signal the start of user activity to the model.""" |
50 | 42 | activity_end: Optional[types.ActivityEnd] = None |
51 | | - """If set, signal the end of user activity to the model. |
52 | | -
|
53 | | - When multiple fields are set, they are processed by priority (highest first): |
54 | | - activity_start > activity_end > blob > content. |
55 | | - """ |
| 43 | + """If set, signal the end of user activity to the model.""" |
56 | 44 | audio_stream_end: bool = False |
57 | | - """If set, signal the end of the audio stream to the model. This is only used |
58 | | - when Voice Activity Detection is enabled. |
59 | | -
|
60 | | - When multiple fields are set, they are processed by priority (highest first): |
61 | | - activity_start > activity_end > audio_stream_end > blob > content. |
| 45 | + """If set, signal the end of the audio stream to the model. |
| 46 | + This is only used when Voice Activity Detection is enabled. |
62 | 47 | """ |
63 | 48 | close: bool = False |
64 | 49 | """If set, close the queue. queue.shutdown() is only supported in Python 3.13+.""" |
|
0 commit comments