Open liana-gif opened 5 days ago
@liana-gif and @Aspect13, this is a BE issue, BE doesn't validate the tools and the response is in wrong format which is different from the format of response of importing.
Request:
curl 'http://localhost:5173/api/v1/applications/fork/prompt_lib/2' \ -H 'Accept: /' \ -H 'Accept-Language: en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7' \ -H 'Connection: keep-alive' \ -H 'Cookie: centry_gaid=1329ccd8-940b-4dc8-9a84-c7bd949b60da' \ -H 'Origin: http://localhost:5173' \ -H 'Referer: http://localhost:5173/agents/all/23?viewMode=owner&name=3444' \ -H 'Sec-Fetch-Dest: empty' \ -H 'Sec-Fetch-Mode: cors' \ -H 'Sec-Fetch-Site: same-origin' \ -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' \ -H 'authorization: Bearer **' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'sec-ch-ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"' \ -H 'sec-ch-ua-mobile: ?0' \ -H 'sec-ch-ua-platform: "macOS"' \ --data-raw '{"applications":[{"name":"3444","description":"ghhj","owner_id":7,"versions":[{"name":"latest","author_id":9,"tags":[],"instructions":"","application_id":23,"llm_settings":{"temperature":0.7,"top_p":0.8,"top_k":20,"max_tokens":512,"model_name":"gpt-35-turbo","integration_uid":"28c69e26-7fb7-43f1-ad25-7fb443a5ffc3"},"variables":[],"tools":[{"name":"Confluence Tool","description":"Confluence Tool","type":"confluence","settings":{"base_url":"","token":"","space":"EPMCNHR","cloud":false,"limit":5,"max_pages":10,"number_of_retries":2,"min_retry_seconds":10,"max_retry_seconds":60,"selected_tools":["get_pages_with_label","search_pages","create_page","create_pages","get_page_tree","delete_page","update_page_by_id","update_page_by_title","update_labels","update_pages","site_search","search_by_title","read_page_by_id"]},"id":812}],"conversation_starters":[],"agent_type":"react","welcome_message":"","id":68,"status":"draft","created_at":"2024-08-05T09:59:38.551488","author":{"id":9,"email":"hawk_qing@epam.com","name":"Hawk Qing","avatar":"https://static.cdn.epam.com/avatar/5c90fb5821cdf14c94fd6dc42aba63b6.jpg"},"is_forked":false,"import_version_uuid":"00000000-0000-0000-2372-5d156397c29b","entityName":"3444","entityDescription":"ghhj","itemIndex":"0","versionIndex":"0"}],"id":23,"import_uuid":"00000000-0000-0000-1569-81976ffcf3e2","original_exported":true,"entity":"agents"}]}'
Response: { "prompts": [], "datasources": [], "agents": [ { "name": "3444", "description": "ghhj", "owner_id": 2, "shared_id": null, "shared_owner_id": null, "versions": [ { "id": 356, "name": "latest", "status": "draft", "created_at": "2024-11-20T02:47:44.986939" } ], "id": 208, "version_details": { "name": "latest", "author_id": 9, "tags": [], "instructions": "", "application_id": 208, "shared_id": null, "shared_owner_id": null, "llm_settings": { "temperature": 0.7, "top_p": 0.8, "top_k": 20, "max_tokens": 512, "model_name": "gpt-35-turbo", "integration_uid": "28c69e26-7fb7-43f1-ad25-7fb443a5ffc3" }, "variables": [], "tools": [ { "name": "Confluence Tool", "description": "Confluence Tool", "type": "confluence", "settings": { "base_url": "", "token": "{{secret.aec6c5e677a84848bf20f8cc6b05317c}}", "api_key": null, "username": null, "space": "EPMCNHR", "cloud": false, "limit": 5, "max_pages": 10, "number_of_retries": 2, "min_retry_seconds": 10, "max_retry_seconds": 60, "selected_tools": [ "get_pages_with_label", "search_pages", "create_page", "create_pages", "get_page_tree", "delete_page", "update_page_by_id", "update_page_by_title", "update_labels", "update_pages", "site_search", "search_by_title", "read_page_by_id" ] }, "id": 2958 } ], "conversation_starters": [], "agent_type": "react", "welcome_message": "", "id": 356, "status": "draft", "created_at": "2024-11-20T02:47:44.986939", "author": { "id": 9, "email": "hawk_qing@epam.com", "name": "Hawk Qing", "avatar": "https://static.cdn.epam.com/avatar/5c90fb5821cdf14c94fd6dc42aba63b6.jpg" }, "meta": { "parent_entity_id": 23, "parent_project_id": 7 }, "is_forked": true }, "created_at": "2024-11-20T02:47:44.986939", "collections": [], "index": 0 } ] }
@liana-gif it's fixed, please verify it on main.
@Aspect13 was able to reproduce issue, please see attached demo
Steps to reproduce:
Expected Result: An error message should be displayed prompting the user to enter the required fields (URL, Username, and Key) before the forking process can proceed.
Actual Result: A success message is displayed even though the necessary information for forking (URL, Username, and Key) has not been provided.
see attached screen shot