Skip to content

Commit a456f82

Browse files
authored
New attachments recognized by GC (microsoft#277)
- Allows GC to recognize new attachments via user message. - GC already setup to set user decision to update_outline as a result. - Immediately moves on to updating outline with new attachment content.
1 parent 125ffb5 commit a456f82

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

assistants/prospector-assistant/assistant/agents/document/gc_draft_outline_feedback_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ArtifactModel(BaseModel):
6565
a. At any time, if the user asks for a change to the outline, the conversation_status must be
6666
marked as user_completed. The user_decision must be marked as update_outline. The final_response
6767
must inform the user that a new outline is being generated based off the request.
68-
b. At any time, if the user has provided new attachments (detected via the filenames in the artifact),
68+
b. At any time, if the user has provided new attachments (detected via `Newly attached files:` in the user message),
6969
the conversation_status must be marked as user_completed. The user_decision must be marked as
7070
update_outline. The final_response must inform the user that a new outline is being generated based
7171
on the addition of new attachments.

assistants/prospector-assistant/assistant/agents/document_agent.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,13 @@ async def _gc_outline_feedback(
941941
user_message = None
942942
else:
943943
user_message = message.content
944+
945+
# if any files attached with message, include in user_message for GC knowledge:
946+
if len(message.filenames) != 0:
947+
user_message = user_message + " Newly attached files: "
948+
filenames = ", ".join(message.filenames)
949+
user_message = user_message + filenames
950+
944951
response_message, conversation_status, next_step_name = await guided_conversation.step_conversation(
945952
last_user_message=user_message,
946953
)

0 commit comments

Comments
 (0)