diff --git a/application/api/user/routes.py b/application/api/user/routes.py index 239278b9..b1ec69e4 100644 --- a/application/api/user/routes.py +++ b/application/api/user/routes.py @@ -351,7 +351,14 @@ def get_api_keys(): keys = api_key_collection.find({"user": user}) list_keys = [] for key in keys: - list_keys.append({"id": str(key["_id"]), "name": key["name"], "key": key["key"][:4] + "..." + key["key"][-4:], "source": key["source"]}) + list_keys.append({ + "id": str(key["_id"]), + "name": key["name"], + "key": key["key"][:4] + "..." + key["key"][-4:], + "source": key["source"], + "prompt_id": key["prompt_id"], + "chunks": key["chunks"] + }) return jsonify(list_keys) @user.route("/api/create_api_key", methods=["POST"]) @@ -359,6 +366,8 @@ def create_api_key(): data = request.get_json() name = data["name"] source = data["source"] + prompt_id = data["prompt_id"] + chunks = data["chunks"] key = str(uuid.uuid4()) user = "local" resp = api_key_collection.insert_one( @@ -367,6 +376,8 @@ def create_api_key(): "key": key, "source": source, "user": user, + "prompt_id": prompt_id, + "chunks": chunks } ) new_id = str(resp.inserted_id) diff --git a/frontend/src/components/Dropdown.tsx b/frontend/src/components/Dropdown.tsx index 0c4dca3d..279070cb 100644 --- a/frontend/src/components/Dropdown.tsx +++ b/frontend/src/components/Dropdown.tsx @@ -14,6 +14,8 @@ function Dropdown({ showDelete, onDelete, placeholder, + fullWidth, + alignMidddle, }: { options: | string[] @@ -31,8 +33,8 @@ function Dropdown({ showDelete?: boolean; onDelete?: (value: string) => void; placeholder?: string; - className?: string; - width?: string; + fullWidth?: boolean; + alignMidddle?: boolean; }) { const [isOpen, setIsOpen] = React.useState(false); return ( @@ -56,7 +58,9 @@ function Dropdown({ ) : ( diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 15ae206b..39c2a093 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -302,6 +302,7 @@ export default function Upload({ {activeTab === 'remote' && ( <>