diff --git a/library/promptadmin/prompt_service/models/anthropic.py b/library/promptadmin/prompt_service/models/anthropic.py index 8ba2a21..66a232b 100644 --- a/library/promptadmin/prompt_service/models/anthropic.py +++ b/library/promptadmin/prompt_service/models/anthropic.py @@ -59,8 +59,8 @@ async def execute(self, prompt: str, history: list[Message]) -> AnthropicModelRe history.append(Message(content=prompt, role='user')) elif self.prompt_position == 'system': system = prompt - if len(history) ==0: - history.append(Message(content=prompt, role='user')) + if len(history) == 0: + history.append(Message(content="Hello", role='user')) for message in history: if message.role == 'user': diff --git a/server/promptadmin_server/api/service/prompt_unit_test_service.py b/server/promptadmin_server/api/service/prompt_unit_test_service.py index bc762ae..9937232 100644 --- a/server/promptadmin_server/api/service/prompt_unit_test_service.py +++ b/server/promptadmin_server/api/service/prompt_unit_test_service.py @@ -113,7 +113,7 @@ async def preview(self, unit_test: UnitTest, sync_data: SyncData, mapping: Mappi context.update(json.loads(sync_data.template_context_default)) prompt = await self.prompt_load_service.load_mapping_name(mapping, unit_test.name) - preview = await self.preview_template_service.preview(prompt, context) + preview = await self.preview_template_service.preview(prompt, context, mapping.connection_name) unit_test.test_preview = preview except Exception as e: unit_test.test_exception = str(e)