Skip to content

Commit b8108ff

Browse files
dineshkumar31Dinesh Kumar Devamanoharan
andauthored
Update conversation ID in copilot studio client when start_conversation is called (#195)
* Update conversation ID in copilot studio client when start_conversation is called from response header * Update copilot_client.py Removed trailing space to fix formatting * Fixed black formatting --------- Co-authored-by: Dinesh Kumar Devamanoharan <[email protected]>
1 parent 3024b7c commit b8108ff

File tree

1 file changed

+6
-0
lines changed
  • libraries/microsoft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client

1 file changed

+6
-0
lines changed

libraries/microsoft-agents-copilotstudio-client/microsoft_agents/copilotstudio/client/copilot_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ async def post_request(
3535
raise aiohttp.ClientError(
3636
f"Error sending request: {response.status}"
3737
)
38+
39+
# Set conversation ID from response header when status is 200
40+
conversation_id_header = response.headers.get("x-ms-conversationid")
41+
if conversation_id_header:
42+
self._current_conversation_id = conversation_id_header
43+
3844
event_type = None
3945
async for line in response.content:
4046
if line.startswith(b"event:"):

0 commit comments

Comments
 (0)