Skip to content

Commit 531df8d

Browse files
authored
fix(opentrons-ai-server): uncomment context access (#19078)
# Overview Closes AUTH-2019 This uncomments access to context ## Test Plan and Hands on Testing CI ## Risk assessment Low
1 parent f17c4c5 commit 531df8d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

opentrons-ai-server/api/domain/anthropic_predict.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ def __init__(self, settings: Settings) -> None:
7373
{
7474
"role": "user",
7575
"content": [
76-
# TextBlockParam(type="text", text=DOCUMENTS.format(doc_content=self.get_docs()), cache_control={"type": "ephemeral"})
77-
TextBlockParam(type="text", text=DOCUMENTS.format(doc_content=""), cache_control={"type": "ephemeral"})
76+
TextBlockParam(type="text", text=DOCUMENTS.format(doc_content=self.get_docs()), cache_control={"type": "ephemeral"})
7877
],
7978
}
8079
]
@@ -403,7 +402,7 @@ def _build_conversation_history(self, history_with_attachments: List[Dict[str, A
403402

404403
def _create_current_user_message(self, prompt: str, new_file_references: Optional[List[Dict[str, str]]], user_id: str) -> MessageParam:
405404
"""Create the current user message with file attachments."""
406-
relevant_api_docs = "" # self.get_relevant_api_docs(prompt, user_id)
405+
relevant_api_docs = self.get_relevant_api_docs(prompt, user_id)
407406
prompt_with_docs = f"{prompt}\n\n{relevant_api_docs}"
408407

409408
# Create current user message with any new file attachments
@@ -526,7 +525,7 @@ def process_message(
526525
if history:
527526
messages += history
528527

529-
relevant_api_docs = "" # self.get_relevant_api_docs(prompt, user_id)
528+
relevant_api_docs = self.get_relevant_api_docs(prompt, user_id)
530529
prompt_with_docs = f"{prompt}\n\n{relevant_api_docs}"
531530

532531
# Create user message with file attachments if present

0 commit comments

Comments
 (0)