新增回调接口url前缀

This commit is contained in:
zhh
2025-10-27 11:29:26 +08:00
parent 8c66e90919
commit 86fa6c0860
3 changed files with 9 additions and 6 deletions

View File

@@ -258,7 +258,7 @@ class AsyncStylistAgent:
context += "\nPlease recommend the next single item based on the selected items, user's request, and style guide."
return context
async def run_styling_process(self, request_summary, stylist_path, start_outfit=None, user_id="test"):
async def run_styling_process(self, request_summary, stylist_path, start_outfit=None, user_id="test", callback_url=""):
if start_outfit is None:
start_outfit = []
self.outfit_items = start_outfit if start_outfit else []
@@ -365,7 +365,7 @@ class AsyncStylistAgent:
'Connection': "keep-alive",
'Content-Type': "application/json"
}
url = 'https://83aa2db8e006.ngrok-free.app/api/style/callback'
url = f'{callback_url}/api/style/callback'
response = post_request(url=url, data=json.dumps(response_data), headers=headers)
logger.info(response.text)
return response_data