From a5af1bb4dce0ed1c4b1680fe1d7162d56beeeede Mon Sep 17 00:00:00 2001 From: Dan Orlando Date: Tue, 24 Sep 2024 09:23:40 -0700 Subject: [PATCH] Update models (#208) * Update OpenAI models * Add anthropic to .env.example --------- Co-authored-by: Dan Orlando --- .env.example | 5 + docs/assistants.md | 8 +- stack/app/agents/configurable_agent.py | 24 +- stack/app/schema/assistant.py | 16 +- .../PersonaFlow.postman_collection.json | 11514 +++++++--------- stack/tests/integration/openapi.json | 372 +- stack/tests/unit/conftest.py | 6 +- ui/package.json | 2 +- .../build-panel/components/assistant-form.tsx | 4 +- .../components/create-assistant.tsx | 4 +- 10 files changed, 5491 insertions(+), 6464 deletions(-) diff --git a/.env.example b/.env.example index 489acb66..67f84084 100644 --- a/.env.example +++ b/.env.example @@ -121,3 +121,8 @@ GOOGLE_CLIENT_SECRET= OIDC_CLIENT_ID= OIDC_CLIENT_SECRET= OIDC_WELL_KNOWN_ENDPOINT= + + +# For Anthropic Claude API +ANTHROPIC_MODEL_NAME="claude-3-5-sonnet-20240620" +ANTHROPIC_API_KEY="" diff --git a/docs/assistants.md b/docs/assistants.md index cfc02e62..3e8cb301 100644 --- a/docs/assistants.md +++ b/docs/assistants.md @@ -20,13 +20,13 @@ The setup is unique in that it is meant to be easily modified as new agent archi "type": "agent", "type==agent/tools": [], "type==agent/interupt_before_action": true, - "type==agent/agent_type": "GPT 3.5 Turbo", + "type==agent/agent_type": "GPT 4o Mini", "type==agent/system_message": "You are a helpful assistant.", "type==agent/retrieval_description": "Can be used to look up information.", "type==chat_retrieval/system_message": "You are a helpful assistant.", - "type==chatbot/llm_type": "GPT 3.5 Turbo", + "type==chatbot/llm_type": "GPT 4o Mini", "type==chatbot/system_message": "You are a helpful assistant.", - "type==chat_retrieval/llm_type": "GPT 3.5 Turbo" + "type==chat_retrieval/llm_type": "GPT 4o Mini" } } ``` @@ -39,7 +39,7 @@ In this example, there are three assistant architectures: agent, chatbot, and ch "type": "agent", "type==agent/tools": [], "type==agent/interupt_before_action": true, - "type==agent/agent_type": "GPT 3.5 Turbo", + "type==agent/agent_type": "GPT 4o Mini", "type==agent/system_message": "You are a helpful assistant.", "type==agent/retrieval_description": "Can be used to look up information." } diff --git a/stack/app/agents/configurable_agent.py b/stack/app/agents/configurable_agent.py index 5e745348..d3cd1080 100644 --- a/stack/app/agents/configurable_agent.py +++ b/stack/app/agents/configurable_agent.py @@ -66,7 +66,7 @@ def get_llm(llm_type: LLMType): - if llm_type == LLMType.GPT_35_TURBO: + if llm_type == LLMType.GPT_4O_MINI: llm = get_openai_llm() elif llm_type == LLMType.GPT_4: llm = get_openai_llm(model="gpt-4-turbo") @@ -74,9 +74,9 @@ def get_llm(llm_type: LLMType): llm = get_openai_llm(model="gpt-4o") elif llm_type == LLMType.AZURE_OPENAI: llm = get_openai_llm(azure=True) - elif llm_type == LLMType.CLAUDE2: + elif llm_type == LLMType.ANTHROPIC_CLAUDE: llm = get_anthropic_llm() - elif llm_type == LLMType.BEDROCK_CLAUDE2: + elif llm_type == LLMType.BEDROCK_ANTHROPIC_CLAUDE: llm = get_anthropic_llm(bedrock=True) elif llm_type == LLMType.GEMINI: llm = get_google_llm() @@ -95,7 +95,7 @@ def get_agent_executor( system_message: str, interrupt_before_action: bool, ): - if agent == AgentType.GPT_35_TURBO: + if agent == AgentType.GPT_4O_MINI: llm = get_openai_llm() return get_tools_agent_executor( tools, llm, system_message, interrupt_before_action, CHECKPOINTER @@ -115,12 +115,12 @@ def get_agent_executor( return get_tools_agent_executor( tools, llm, system_message, interrupt_before_action, CHECKPOINTER ) - elif agent == AgentType.CLAUDE2: + elif agent == AgentType.ANTHROPIC_CLAUDE: llm = get_anthropic_llm() return get_tools_agent_executor( tools, llm, system_message, interrupt_before_action, CHECKPOINTER ) - elif agent == AgentType.BEDROCK_CLAUDE2: + elif agent == AgentType.BEDROCK_ANTHROPIC_CLAUDE: llm = get_anthropic_llm(bedrock=True) return get_xml_agent_executor( tools, llm, system_message, interrupt_before_action, CHECKPOINTER @@ -154,7 +154,7 @@ def __init__( self, *, tools: Sequence[Tool], - agent: AgentType = AgentType.GPT_35_TURBO, + agent: AgentType = AgentType.GPT_4O_MINI, system_message: str = DEFAULT_SYSTEM_MESSAGE, assistant_id: Optional[str] = None, thread_id: Optional[str] = None, @@ -216,7 +216,7 @@ class ConfigurableChatBot(RunnableBinding): def __init__( self, *, - llm: LLMType = LLMType.GPT_35_TURBO, + llm: LLMType = LLMType.GPT_4O_MINI, system_message: str = DEFAULT_SYSTEM_MESSAGE, kwargs: Optional[Mapping[str, Any]] = None, config: Optional[Mapping[str, Any]] = None, @@ -235,7 +235,7 @@ def __init__( chatbot = ( - ConfigurableChatBot(llm=LLMType.GPT_35_TURBO, checkpoint=CHECKPOINTER) + ConfigurableChatBot(llm=LLMType.GPT_4O_MINI, checkpoint=CHECKPOINTER) .configurable_fields( llm=ConfigurableField(id="llm_type", name="LLM Type"), system_message=ConfigurableField(id="system_message", name="Instructions"), @@ -257,7 +257,7 @@ class ConfigurableRetrieval(RunnableBinding): def __init__( self, *, - llm_type: LLMType = LLMType.GPT_35_TURBO, + llm_type: LLMType = LLMType.GPT_4O_MINI, system_message: str = DEFAULT_SYSTEM_MESSAGE, assistant_id: Optional[str] = None, thread_id: Optional[str] = None, @@ -279,7 +279,7 @@ def __init__( chat_retrieval = ( - ConfigurableRetrieval(llm_type=LLMType.GPT_35_TURBO, checkpoint=CHECKPOINTER) + ConfigurableRetrieval(llm_type=LLMType.GPT_4O_MINI, checkpoint=CHECKPOINTER) .configurable_fields( llm_type=ConfigurableField(id="llm_type", name="LLM Type"), system_message=ConfigurableField(id="system_message", name="Instructions"), @@ -297,7 +297,7 @@ def __init__( agent: Pregel = ( ConfigurableAgent( - agent=AgentType.GPT_35_TURBO, + agent=AgentType.GPT_4O_MINI, tools=[], system_message=DEFAULT_SYSTEM_MESSAGE, retrieval_description=RETRIEVAL_DESCRIPTION, diff --git a/stack/app/schema/assistant.py b/stack/app/schema/assistant.py index 74828310..fec431f5 100644 --- a/stack/app/schema/assistant.py +++ b/stack/app/schema/assistant.py @@ -13,23 +13,23 @@ class BotType(str, Enum): class AgentType(str, Enum): - GPT_35_TURBO = "GPT 3.5 Turbo" + GPT_4O_MINI = "GPT 4o Mini" GPT_4 = "GPT 4 Turbo" GPT_4O = "GPT 4o" AZURE_OPENAI = "GPT 4 (Azure OpenAI)" - CLAUDE2 = "Claude 2" - BEDROCK_CLAUDE2 = "Claude 2 (Amazon Bedrock)" + ANTHROPIC_CLAUDE = "Anthropic Claude" + BEDROCK_ANTHROPIC_CLAUDE = "Anthropic Claude (Amazon Bedrock)" GEMINI = "GEMINI" OLLAMA = "Ollama" class LLMType(str, Enum): - GPT_35_TURBO = "GPT 3.5 Turbo" + GPT_4O_MINI = "GPT 4o Mini" GPT_4 = "GPT 4" GPT_4O = "GPT 4o" AZURE_OPENAI = "GPT 4 (Azure OpenAI)" - CLAUDE2 = "Claude 2" - BEDROCK_CLAUDE2 = "Claude 2 (Amazon Bedrock)" + ANTHROPIC_CLAUDE = "Anthropic Claude" + BEDROCK_ANTHROPIC_CLAUDE = "Anthropic Claude (Amazon Bedrock)" GEMINI = "GEMINI" MIXTRAL = "Mixtral" OLLAMA = "Ollama" @@ -63,7 +63,7 @@ class Configurable(BaseModel): default="agent", title="Bot Type", description="The type of bot." ) agent_type: AgentType = Field( - default="GPT 3.5 Turbo", + default="GPT 4o Mini", title="Agent Type", description="The type of agent, applicable if the bot type is 'agent'.", ) @@ -86,7 +86,7 @@ class Configurable(BaseModel): default=[], title="Tools", description="List of tools available for the agent." ) llm_type: Optional[LLMType] = Field( - default="GPT 3.5 Turbo", + default="GPT 4o Mini", title="LLM Type", description="The type of language model, applicable if the bot type is 'chat_retrieval' or 'chatbot'.", ) diff --git a/stack/tests/integration/PersonaFlow.postman_collection.json b/stack/tests/integration/PersonaFlow.postman_collection.json index 02ba3ab3..54ab1849 100644 --- a/stack/tests/integration/PersonaFlow.postman_collection.json +++ b/stack/tests/integration/PersonaFlow.postman_collection.json @@ -1,6151 +1,5365 @@ { - "info": { - "_postman_id": "711b1f9f-6bcb-4650-b362-c7bdcc0e74eb", - "name": "PersonaFlow", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", - "_exporter_id": "16936331", - "_collection_link": "https://winter-resonance-224282.postman.co/workspace/5a05c830-9309-4e81-bbbb-50425c42988f/collection/16936331-711b1f9f-6bcb-4650-b362-c7bdcc0e74eb?action=share&source=collection_link&creator=16936331" - }, - "item": [ - { - "name": "api/v1", - "item": [ - { - "name": "runs", - "item": [ - { - "name": "Create a run", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs" - ] - }, - "description": "Create a run to be processed by the LLM." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "\"\"" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Stream an LLM run.", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs/stream", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "stream" - ] - }, - "description": "Endpoint to stream an LLM response. If the thread_id is not provided, a new thread will be created as long as the assistant_id is included.
\n Note that the input should be a list of messages in the format:
\n content: string
\n role: string
\n additional_kwargs: dict
\n example: bool
" - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs/stream", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "stream" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "text", - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "cookie": [], - "body": "" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs/stream", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "stream" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Return the input schema of the runnable.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/runs/input_schema", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "input_schema" - ] - }, - "description": "Return the input schema of the runnable." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/runs/input_schema", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "input_schema" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "\"\"" - } - ] - }, - { - "name": "Return the output schema of the runnable.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/runs/output_schema", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "output_schema" - ] - }, - "description": "Return the output schema of the runnable." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/runs/output_schema", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "output_schema" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "\"\"" - } - ] - }, - { - "name": "Return the config schema of the runnable.", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/runs/config_schema", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "config_schema" - ] - }, - "description": "Return the config schema of the runnable." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/runs/config_schema", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "config_schema" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "\"\"" - } - ] - }, - { - "name": "Generate a title to name the thread.", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"thread_id\": \"\",\n \"history\": [\n {\n \"content\": \"\",\n \"type\": \"\"\n },\n {\n \"content\": \"\",\n \"type\": \"\"\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs/title", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "title" - ] - }, - "description": "Generates a title for the conversation by sending a list of interactions to the model." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"thread_id\": \"\",\n \"history\": [\n {\n \"content\": \"\",\n \"type\": \"\"\n },\n {\n \"content\": \"\",\n \"type\": \"\"\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs/title", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "title" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"thread_id\": \"\",\n \"history\": [\n {\n \"content\": \"\",\n \"type\": \"\"\n },\n {\n \"content\": \"\",\n \"type\": \"\"\n }\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/runs/title", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "runs", - "title" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "threads", - "item": [ - { - "name": "{thread_id}", - "item": [ - { - "name": "state", - "item": [ - { - "name": "Retrieve thread state", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "state" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Retrieves the state of a thread identified by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "state" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "state" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Add thread state", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"values\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"config\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "state" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Adds the state of a thread identified by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"values\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"config\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "state" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"values\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"config\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "state" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Retrieve a specific thread", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Retrieves detailed information about a thread identified by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Update a specific thread", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Updates the information of a thread identified by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Delete a specific thread", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Deletes a thread identified by its ID from the database." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "No Content", - "code": 204, - "_postman_previewlanguage": "text", - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "cookie": [], - "body": "" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Get thread history", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/history", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "history" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Gets the history of the thread identified by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/history", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "history" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/threads/:thread_id/history", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads", - ":thread_id", - "history" - ], - "variable": [ - { - "key": "thread_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Create a new thread", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads" - ] - }, - "description": "Creates a new thread with the provided information. This can optionally be obtained from the api_key. If it is not set in the request, it will attempt to get it from the api_key." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"assistant_id\": \"\",\n \"user_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"assistant_id\": \"\",\n \"user_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/threads", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "threads" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "assistants", - "item": [ - { - "name": "{assistant_id}", - "item": [ - { - "name": "files", - "item": [ - { - "name": "Add an uploaded file to an assistant for RAG.", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.sendRequest({", - " url: pm.environment.get(\"baseUrl\") + \"/api/v1/assistants\",", - " method: 'POST',", - " header: {", - " 'X-API-KEY': pm.environment.get(\"apiKey\"),", - " 'Content-Type': 'application/json'", - " },", - " body: {", - " mode: 'raw',", - " raw: JSON.stringify({", - " \"name\": \"Weather assistant\",", - " \"config\": {", - " \"configurable\": {", - " \"type\": \"chatbot\",", - " \"agent_type\": \"GPT 3.5 Turbo\",", - " \"system_message\": \"You are a helpful weather assistant.\",", - " \"tools\": [\"DDG Search\"],", - " \"llm_type\": \"GPT 3.5 Turbo\"", - " }", - " },", - " \"kwargs\": {", - " \"description\": \"An assistant for weather-related queries\"", - " },", - " \"public\": false", - "})", - " }", - "}, function (err, res) {", - " if (err) {", - " console.log(err);", - " } else {", - " const response = res.json();", - " pm.environment.set(\"assistantId\", response.id);", - " }", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"file_id\": \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - "{{assistantId}}", - "files" - ] - }, - "description": "Convenience method to add an uploaded file to an assistant for RAG ingestion and retrieval" - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"file_id\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id", - "files" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"file_id\": \"\",\n \"assistant_id\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"file_id\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id", - "files" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve file information for all files associated with an assistant", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.variables.set(\"assistantId\", \"36395fdd-b0e3-4d4f-b9e4-38737cc6cccd\")" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - "{{assistantId}}", - "files" - ] - }, - "description": "Returns a list of file objects for all files associated with an assistant." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files?limit=20&order=desc&before=&after=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id", - "files" - ], - "query": [ - { - "key": "limit", - "value": "20" - }, - { - "key": "order", - "value": "desc" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - } - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n]" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files?limit=20&order=desc&before=&after=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id", - "files" - ], - "query": [ - { - "key": "limit", - "value": "20" - }, - { - "key": "order", - "value": "desc" - }, - { - "key": "before", - "value": "" - }, - { - "key": "after", - "value": "" - } - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Remove a file from an assistant", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.variables.set(\"assistantId\", \"36395fdd-b0e3-4d4f-b9e4-38737cc6cccd\")", - "pm.variables.set(\"fileId\", \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\")" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "DELETE", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}/files/{{fileId}}", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - "{{assistantId}}", - "files", - "{{fileId}}" - ] - }, - "description": "Removes a file from an assistant by its ID. This also deletes the corresponding documents from the vector store." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id", - "files", - ":file_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - }, - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id", - "files", - ":file_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - }, - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Retrieve a specific assistant", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.sendRequest({", - " url: pm.environment.get(\"baseUrl\") + \"/api/v1/assistants\",", - " method: 'POST',", - " header: {", - " 'X-API-KEY': pm.environment.get(\"apiKey\"),", - " 'Content-Type': 'application/json'", - " },", - " body: {", - " mode: 'raw',", - " raw: JSON.stringify({", - " \"name\": \"Weather assistant\",", - " \"config\": {", - " \"configurable\": {", - " \"type\": \"chatbot\",", - " \"agent_type\": \"GPT 3.5 Turbo\",", - " \"system_message\": \"You are a helpful weather assistant.\",", - " \"tools\": [\"DDG Search\"],", - " \"llm_type\": \"GPT 3.5 Turbo\"", - " }", - " },", - " \"user_id\": \"asdf\",", - " \"kwargs\": {", - " \"description\": \"An assistant for weather-related queries\"", - " },", - " \"public\": false", - "})", - " }", - "}, function (err, res) {", - " if (err) {", - " console.log(err);", - " } else {", - " const response = res.json();", - " pm.environment.set(\"assistantId\", response.id);", - " }", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - "{{assistantId}}" - ] - }, - "description": "Retrieves detailed information about a specific assistant by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Update a specific assistant", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.sendRequest({", - " url: pm.environment.get(\"baseUrl\") + \"/api/v1/assistants\",", - " method: 'POST',", - " header: {", - " 'X-API-KEY': pm.environment.get(\"apiKey\"),", - " 'Content-Type': 'application/json'", - " },", - " body: {", - " mode: 'raw',", - " raw: JSON.stringify({", - " \"name\": \"Weather assistant\",", - " \"config\": {", - " \"configurable\": {", - " \"type\": \"chatbot\",", - " \"agent_type\": \"GPT 3.5 Turbo\",", - " \"system_message\": \"You are a helpful weather assistant.\",", - " \"tools\": [\"DDG Search\"],", - " \"llm_type\": \"GPT 3.5 Turbo\"", - " }", - " },", - " \"user_id\": \"asdf\",", - " \"kwargs\": {", - " \"description\": \"An assistant for weather-related queries\"", - " },", - " \"public\": false", - "})", - " }", - "}, function (err, res) {", - " if (err) {", - " console.log(err);", - " } else {", - " const response = res.json();", - " pm.environment.set(\"assistantId\", response.id);", - " }", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Weather assistant updated\",\n \"config\": {\n \"configurable\": {\n \"type\": \"chatbot\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"system_message\": \"You are a helpful weather assistant.\",\n \"tools\": [\"DDG Search\"],\n \"llm_type\": \"GPT 3.5 Turbo\"\n }\n },\n \"user_id\": \"asdf\",\n \"kwargs\": {\n \"description\": \"An assistant for weather-related queries\"\n },\n \"public\": false\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - "{{assistantId}}" - ] - }, - "description": "Updates the details of a specific assistant by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Delete a specific assistant", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 204\", function () {", - " pm.response.to.have.status(204);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.variables.set(\"assistantId\", \"cd2a7145-6f36-4456-8fa9-e81be98a2409\")" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "DELETE", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - "{{assistantId}}" - ] - }, - "description": "Deletes a specific assistant by its ID from the database." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "No Content", - "code": 204, - "_postman_previewlanguage": "text", - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "cookie": [], - "body": "" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants", - ":assistant_id" - ], - "variable": [ - { - "key": "assistant_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Retrieve all assistants", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants" - ] - }, - "description": "Retrieves a list of all assistants." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n },\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n }\n]" - } - ] - }, - { - "name": "Create a new assistant", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"Weather assistant\",\n \"config\": {\n \"configurable\": {\n \"type\": \"chatbot\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"system_message\": \"You are a helpful weather assistant.\",\n \"tools\": [\"DDG Search\"],\n \"llm_type\": \"GPT 3.5 Turbo\"\n }\n },\n \"kwargs\": {\n \"description\": \"An assistant for weather-related queries\"\n },\n \"public\": false\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants" - ] - }, - "description": "Creates a new assistant with the specified details." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "assistants" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "rag", - "item": [ - { - "name": "Ingest files to be indexed and queried.", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"files\": [\n \"\",\n \"\"\n ],\n \"purpose\": \"\",\n \"index_name\": \"\",\n \"namespace\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"document_processor\": {\n \"summarize\": false,\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"unstructured\": {\n \"partition_strategy\": \"auto\",\n \"hi_res_model_name\": \"detectron2_onnx\",\n \"process_tables\": false\n },\n \"splitter\": {\n \"name\": \"semantic\",\n \"min_tokens\": 30,\n \"max_tokens\": 800,\n \"rolling_window_size\": 1,\n \"prefix_titles\": true,\n \"prefix_summary\": true\n }\n },\n \"webhook_url\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/ingest", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "ingest" - ] - }, - "description": "Upload files for ingesting using the advanced RAG system." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"files\": [\n \"\",\n \"\"\n ],\n \"purpose\": \"\",\n \"index_name\": \"\",\n \"namespace\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"document_processor\": {\n \"summarize\": false,\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"unstructured\": {\n \"partition_strategy\": \"auto\",\n \"hi_res_model_name\": \"detectron2_onnx\",\n \"process_tables\": false\n },\n \"splitter\": {\n \"name\": \"semantic\",\n \"min_tokens\": 30,\n \"max_tokens\": 800,\n \"rolling_window_size\": 1,\n \"prefix_titles\": true,\n \"prefix_summary\": true\n }\n },\n \"webhook_url\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/ingest", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "ingest" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "\"\"" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"files\": [\n \"\",\n \"\"\n ],\n \"purpose\": \"\",\n \"index_name\": \"\",\n \"namespace\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"document_processor\": {\n \"summarize\": false,\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"unstructured\": {\n \"partition_strategy\": \"auto\",\n \"hi_res_model_name\": \"detectron2_onnx\",\n \"process_tables\": false\n },\n \"splitter\": {\n \"name\": \"semantic\",\n \"min_tokens\": 30,\n \"max_tokens\": 800,\n \"rolling_window_size\": 1,\n \"prefix_titles\": true,\n \"prefix_summary\": true\n }\n },\n \"webhook_url\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/ingest", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "ingest" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Query documents", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/query", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "query" - ] - }, - "description": "Query ingested documents using advanced RAG system with unstructured library.
" - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/query", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "query" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"success\": \"\",\n \"data\": [\n {\n \"id\": \"\",\n \"document_id\": \"\",\n \"page_content\": \"\",\n \"file_id\": \"\",\n \"namespace\": \"\",\n \"source\": \"\",\n \"source_type\": \"\",\n \"chunk_index\": \"\",\n \"title\": \"\",\n \"purpose\": \"\",\n \"token_count\": \"\",\n \"page_number\": \"\",\n \"metadata\": \"\",\n \"dense_embedding\": [\n \"\",\n \"\"\n ]\n },\n {\n \"id\": \"\",\n \"document_id\": \"\",\n \"page_content\": \"\",\n \"file_id\": \"\",\n \"namespace\": \"\",\n \"source\": \"\",\n \"source_type\": \"\",\n \"chunk_index\": \"\",\n \"title\": \"\",\n \"purpose\": \"\",\n \"token_count\": \"\",\n \"page_number\": \"\",\n \"metadata\": \"\",\n \"dense_embedding\": [\n \"\",\n \"\"\n ]\n }\n ]\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/query", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "query" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Query Lc Retriever", - "request": { - "auth": { - "type": "apikey", - "apikey": [ - { - "key": "key", - "value": "X-API-KEY", - "type": "string" - }, - { - "key": "value", - "value": "{{apiKey}}", - "type": "string" - }, - { - "key": "in", - "value": "header", - "type": "string" - } - ] - }, - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/query-lc-retriever", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "query-lc-retriever" - ] - } - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/query-lc-retriever", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "query-lc-retriever" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/rag/query-lc-retriever", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "rag", - "query-lc-retriever" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "files", - "item": [ - { - "name": "{file_id}", - "item": [ - { - "name": "Retrieve file information", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.variables.set(\"fileId\", \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\")" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/{{fileId}}", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - "{{fileId}}" - ] - }, - "description": "Retrieves information about a specific file by its ID." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Delete a specific file", - "request": { - "method": "DELETE", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Deletes a specific file by its ID from the database and file system. When a file is deleted, it is also removed from any assistants that may be using it and all associated embeddings are deleted from the vector store." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"file_id\": \"\",\n \"num_of_assistants\": \"\",\n \"assistants\": [\n \"\",\n \"\"\n ],\n \"num_of_deleted_chunks\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve the content of a specific file", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "prerequest", - "script": { - "exec": [ - "pm.variables.set(\"fileId\", \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\")" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/{{fileId}}/content", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - "{{fileId}}", - "content" - ] - }, - "description": "Retrieves the content of a specific file by its ID. Returns a downloadable file." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id/content", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id", - "content" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files/:file_id/content", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files", - ":file_id", - "content" - ], - "variable": [ - { - "key": "file_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Upload a file", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "const uuid = require('uuid');", - "", - "pm.variables.set('file_name', uuid.v4());" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 201\", function () {", - " pm.response.to.have.status(201);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "multipart/form-data" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "description": "(Required) The file to upload.", - "type": "file", - "src": "postman-cloud:///1ef379dd-c051-4b10-98ce-f78ec7887dbe" - }, - { - "key": "purpose", - "value": "assistants", - "description": "(Required) The purpose of the file: 'assistants', 'threads', or 'personas'.", - "type": "text" - }, - { - "key": "filename", - "value": "{{file_name}}.pdf", - "description": "The preferred name for the file.", - "type": "text" - }, - { - "key": "kwargs", - "value": "{}", - "description": "Any additonal metadata to include for this file. This should be a JSON string.", - "type": "text" - } - ] - }, - "url": { - "raw": "{{baseUrl}}/api/v1/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files" - ] - }, - "description": "Uploads a file that can be used across various endpoints.
NOTE: MUST INCLUDE `user_id`" - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "value": "", - "description": "(Required) The file to upload.", - "type": "text" - }, - { - "key": "purpose", - "value": "", - "description": "(Required) The purpose of the file: 'assistants', 'threads', or 'personas'.", - "type": "text" - }, - { - "key": "user_id", - "value": "", - "description": "(Required) The user id of the file owner.", - "type": "text" - }, - { - "key": "filename", - "value": "", - "description": "The preferred name for the file.", - "type": "text" - }, - { - "key": "kwargs", - "value": "", - "description": "Any additonal metadata to include for this file. This should be a JSON string.", - "type": "text" - } - ] - }, - "url": { - "raw": "{{baseUrl}}/api/v1/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files" - ] - } - }, - "status": "Created", - "code": 201, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "formdata", - "formdata": [ - { - "key": "file", - "value": "", - "description": "(Required) The file to upload.", - "type": "text" - }, - { - "key": "purpose", - "value": "", - "description": "(Required) The purpose of the file: 'assistants', 'threads', or 'personas'.", - "type": "text" - }, - { - "key": "user_id", - "value": "", - "description": "(Required) The user id of the file owner.", - "type": "text" - }, - { - "key": "filename", - "value": "", - "description": "The preferred name for the file.", - "type": "text" - }, - { - "key": "kwargs", - "value": "", - "description": "Any additonal metadata to include for this file. This should be a JSON string.", - "type": "text" - } - ] - }, - "url": { - "raw": "{{baseUrl}}/api/v1/files", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve files", - "event": [ - { - "listen": "prerequest", - "script": { - "exec": [ - "" - ], - "type": "text/javascript", - "packages": {} - } - }, - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files?user_id={{userId}}", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files" - ], - "query": [ - { - "key": "user_id", - "value": "{{userId}}" - } - ] - }, - "description": "Retrieves a list of files." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files?user_id=&purpose=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files" - ], - "query": [ - { - "key": "user_id", - "value": "" - }, - { - "key": "purpose", - "value": "" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n]" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "X-API-KEY", - "value": "", - "description": "Added as a part of security scheme: apikey" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/files?user_id=&purpose=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "files" - ], - "query": [ - { - "key": "user_id", - "value": "" - }, - { - "key": "purpose", - "value": "" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "auth", - "item": [ - { - "name": "Get enabled authentication strategies", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/auth/auth_strategies", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "auth", - "auth_strategies" - ] - }, - "description": "Returns a list of enabled authentication strategies." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://localhost:9000/api/v1/auth/auth_strategies", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "9000", - "path": [ - "api", - "v1", - "auth", - "auth_strategies" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"strategy\": \"\",\n \"client_id\": \"\",\n \"authorization_endpoint\": \"\",\n \"pkce_enabled\": \"\"\n },\n {\n \"strategy\": \"\",\n \"client_id\": \"\",\n \"authorization_endpoint\": \"\",\n \"pkce_enabled\": \"\"\n }\n]" - } - ] - }, - { - "name": "Login", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"strategy\": \"\",\n \"payload\": {\n \"qui_d7e\": \"\",\n \"mollit4a1\": \"\",\n \"reprehenderit9_2\": \"\",\n \"est_8c\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/auth/login", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "auth", - "login" - ] - }, - "description": "Logs user in, performing auth according to auth strategy." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"strategy\": \"\",\n \"payload\": {\n \"qui_d7e\": \"\",\n \"mollit4a1\": \"\",\n \"reprehenderit9_2\": \"\",\n \"est_8c\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "http://localhost:9000/api/v1/auth/login", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "9000", - "path": [ - "api", - "v1", - "auth", - "login" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"token\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"strategy\": \"\",\n \"payload\": {\n \"qui_d7e\": \"\",\n \"mollit4a1\": \"\",\n \"reprehenderit9_2\": \"\",\n \"est_8c\": \"\"\n }\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/auth/login", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "auth", - "login" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Authorize", - "request": { - "method": "POST", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/auth/:strategy/auth?code=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "auth", - ":strategy", - "auth" - ], - "query": [ - { - "key": "code", - "value": "", - "description": "Code returned from OAuth provider for OIDC token exchange" - } - ], - "variable": [ - { - "key": "strategy", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "Callback authorization endpoint used for OAuth providers after authenticating on the provider's login screen." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://localhost:9000/api/v1/auth/:strategy/auth", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "9000", - "path": [ - "api", - "v1", - "auth", - ":strategy", - "auth" - ], - "variable": [ - { - "key": "strategy", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"token\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/auth/:strategy/auth", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "auth", - ":strategy", - "auth" - ], - "variable": [ - { - "key": "strategy", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Logout", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/auth/logout", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "auth", - "logout" - ] - }, - "description": "Logs user out, adding the given JWT token to the blacklist." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "http://localhost:9000/api/v1/auth/logout", - "protocol": "http", - "host": [ - "localhost" - ], - "port": "9000", - "path": [ - "api", - "v1", - "auth", - "logout" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - } - ] - } - ] - }, - { - "name": "admin/users", - "item": [ - { - "name": "{user_id}", - "item": [ - { - "name": "Retrieve a specific user", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.have.property('user_id');", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "GET endpoint at `/users/{user_id}` for fetching details of a specific user using its user_id.\n USAGE: Admins can use this endpoint to retrieve details of a specific user.\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Update a specific user ", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.have.property('user_id');", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "PATCH", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "PATCH endpoint at `/{user_id}` for updating the details of a specific user.\n USAGE: Admins can use this endpoint to update the details of a specific user.\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve user assistants", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id", - "assistants" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "Required" - } - ] - }, - "description": "Retrieves a list of the user's assistants." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/assistants", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - "assistants" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n },\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 3.5 Turbo\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n }\n]" - } - ] - }, - { - "name": "Delete a specific user ", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(204);", - "});", - "" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "DELETE", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "DELETE endpoint at `/users/{user_id}` for removing a specific user using its `user_id`.\n USAGE: Admins can use this endpoint to delete a specific user.\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "No Content", - "code": 204, - "_postman_previewlanguage": "text", - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "cookie": [], - "body": "" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id" - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve threads by user ", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/threads?grouped=&timezoneOffset=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id", - "threads" - ], - "query": [ - { - "key": "grouped", - "value": "" - }, - { - "key": "timezoneOffset", - "value": "" - } - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - }, - "description": "GET endpoint at `/users/{user_id}/threads` for fetching all threads associated with a specific user using its id.
\n USAGE: Admins can use this endpoint to retrieve all threads associated with a specific user.\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/threads?grouped=&timezoneOffset=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id", - "threads" - ], - "query": [ - { - "key": "grouped", - "value": "" - }, - { - "key": "timezoneOffset", - "value": "" - } - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n }\n]" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/threads?grouped=&timezoneOffset=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - ":user_id", - "threads" - ], - "query": [ - { - "key": "grouped", - "value": "" - }, - { - "key": "timezoneOffset", - "value": "" - } - ], - "variable": [ - { - "key": "user_id", - "value": "", - "description": "(Required) " - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "List all users ", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "auth": { - "type": "bearer", - "bearer": [ - { - "key": "token", - "value": "{{bearerToken}}", - "type": "string" - } - ] - }, - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users" - ] - }, - "description": "GET endpoint at `/users` for listing all users.\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n }\n]" - } - ] - }, - { - "name": "Create a new user", - "event": [ - { - "listen": "test", - "script": { - "exec": [ - "pm.test(\"Status code is 200\", function () {", - " pm.response.to.have.status(200);", - "});", - "", - "pm.test(\"Response has valid JSON structure\", function () {", - " pm.response.to.be.json;", - " const responseJson = pm.response.json();", - " pm.expect(responseJson).to.have.property('user_id');", - "});" - ], - "type": "text/javascript", - "packages": {} - } - } - ], - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"user_id\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users" - ] - }, - "description": "POST endpoint at `/users` for creating a new user.\n If `user_id` is not present, the database will auto-generate a new UUID for the field.\n This is intended to allow for internal users to be correlated with external systems while not exposing the internal database record id for the user.\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\",\n \"user_id\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "POST", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\",\n \"user_id\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve all threads", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/threads", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - "threads" - ] - }, - "description": "Retrieves a list of all threads in the database.\n Should be used as an admin operation.
\n TODO: Add access control for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/admin/users/threads", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "admin", - "users", - "threads" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n }\n]" - } - ] - } - ] - }, - { - "name": "users/me", - "item": [ - { - "name": "Retrieve a specific user ", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - }, - "description": "GET endpoint to fetch details of the logged-in user.\n USAGE: Admins can use this endpoint to retrieve details of a specific user.\n TODO: Add RBAC for this endpoint." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" - } - ] - }, - { - "name": "Delete a specific user ", - "request": { - "method": "DELETE", - "header": [], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - }, - "description": "DELETE endpoint for removing the logged-in user from the system.\n This will do a cascade delete on all threads and messages, but will not\n effect assistants created by the user." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "DELETE", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - } - }, - "status": "No Content", - "code": 204, - "_postman_previewlanguage": "text", - "header": [ - { - "key": "Content-Type", - "value": "text/plain" - } - ], - "cookie": [], - "body": "" - } - ] - }, - { - "name": "Update a specific user ", - "request": { - "method": "PATCH", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - }, - "description": "PATCH endpoint for updating the details of the logged-in user." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "PATCH", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", - "options": { - "raw": { - "language": "json" - } - } - }, - "url": { - "raw": "{{baseUrl}}/api/v1/users/me", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me" - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - }, - { - "name": "Retrieve threads by user ", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me/threads?grouped=&timezoneOffset=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me", - "threads" - ], - "query": [ - { - "key": "grouped", - "value": "", - "description": "Group threads into date categories (eg. Today, Yesterday, etc.)" - }, - { - "key": "timezoneOffset", - "value": "", - "description": "Timezone offset in minutes from UTC" - } - ] - }, - "description": "GET endpoint for fetching all threads associated with the logged-in user." - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me/threads?grouped=&timezoneOffset=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me", - "threads" - ], - "query": [ - { - "key": "grouped", - "value": "" - }, - { - "key": "timezoneOffset", - "value": "" - } - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n }\n]" - }, - { - "name": "Validation Error", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Authorization", - "value": "Bearer ", - "description": "Added as a part of security scheme: bearer" - }, - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/users/me/threads?grouped=&timezoneOffset=", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "users", - "me", - "threads" - ], - "query": [ - { - "key": "grouped", - "value": "" - }, - { - "key": "timezoneOffset", - "value": "" - } - ] - } - }, - "status": "Unprocessable Entity (WebDAV) (RFC 4918)", - "code": 422, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" - } - ] - } - ] - }, - { - "name": "Health Check", - "request": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/health_check", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "health_check" - ] - } - }, - "response": [ - { - "name": "Successful Response", - "originalRequest": { - "method": "GET", - "header": [ - { - "key": "Accept", - "value": "application/json" - } - ], - "url": { - "raw": "{{baseUrl}}/api/v1/health_check", - "host": [ - "{{baseUrl}}" - ], - "path": [ - "api", - "v1", - "health_check" - ] - } - }, - "status": "OK", - "code": 200, - "_postman_previewlanguage": "json", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "cookie": [], - "body": "{}" - } - ] - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "type": "text/javascript", - "packages": {}, - "exec": [ - "" - ] - } - }, - { - "listen": "test", - "script": { - "type": "text/javascript", - "packages": {}, - "exec": [ - "" - ] - } - } - ], - "variable": [ - { - "key": "baseUrl", - "value": "http://localhost:9000", - "type": "string" - } - ] -} \ No newline at end of file + "info": { + "_postman_id": "711b1f9f-6bcb-4650-b362-c7bdcc0e74eb", + "name": "PersonaFlow", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "16936331", + "_collection_link": "https://winter-resonance-224282.postman.co/workspace/5a05c830-9309-4e81-bbbb-50425c42988f/collection/16936331-711b1f9f-6bcb-4650-b362-c7bdcc0e74eb?action=share&source=collection_link&creator=16936331" + }, + "item": [ + { + "name": "api/v1", + "item": [ + { + "name": "runs", + "item": [ + { + "name": "Create a run", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs"] + }, + "description": "Create a run to be processed by the LLM." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "\"\"" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Stream an LLM run.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs/stream", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "stream"] + }, + "description": "Endpoint to stream an LLM response. If the thread_id is not provided, a new thread will be created as long as the assistant_id is included.
\n Note that the input should be a list of messages in the format:
\n content: string
\n role: string
\n additional_kwargs: dict
\n example: bool
" + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs/stream", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "stream"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"user_id\": \"\",\n \"input\": [\n \"\",\n \"\"\n ],\n \"assistant_id\": \"\",\n \"thread_id\": \"\",\n \"config\": {\n \"tags\": [\n \"\",\n \"\"\n ],\n \"metadata\": \"\",\n \"run_name\": \"\",\n \"max_concurrency\": \"\",\n \"recursion_limit\": \"\",\n \"configurable\": \"\",\n \"run_id\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs/stream", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "stream"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Return the input schema of the runnable.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/runs/input_schema", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "input_schema"] + }, + "description": "Return the input schema of the runnable." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/runs/input_schema", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "input_schema"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "\"\"" + } + ] + }, + { + "name": "Return the output schema of the runnable.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/runs/output_schema", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "output_schema"] + }, + "description": "Return the output schema of the runnable." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/runs/output_schema", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "output_schema"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "\"\"" + } + ] + }, + { + "name": "Return the config schema of the runnable.", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/runs/config_schema", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "config_schema"] + }, + "description": "Return the config schema of the runnable." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/runs/config_schema", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "config_schema"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "\"\"" + } + ] + }, + { + "name": "Generate a title to name the thread.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"thread_id\": \"\",\n \"history\": [\n {\n \"content\": \"\",\n \"type\": \"\"\n },\n {\n \"content\": \"\",\n \"type\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs/title", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "title"] + }, + "description": "Generates a title for the conversation by sending a list of interactions to the model." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"thread_id\": \"\",\n \"history\": [\n {\n \"content\": \"\",\n \"type\": \"\"\n },\n {\n \"content\": \"\",\n \"type\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs/title", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "title"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"thread_id\": \"\",\n \"history\": [\n {\n \"content\": \"\",\n \"type\": \"\"\n },\n {\n \"content\": \"\",\n \"type\": \"\"\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/runs/title", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "runs", "title"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "threads", + "item": [ + { + "name": "{thread_id}", + "item": [ + { + "name": "state", + "item": [ + { + "name": "Retrieve thread state", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "state" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Retrieves the state of a thread identified by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "state" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "state" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Add thread state", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"values\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"config\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "state" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Adds the state of a thread identified by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"values\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"config\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "state" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"values\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"config\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/state", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "state" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Retrieve a specific thread", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Retrieves detailed information about a thread identified by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Update a specific thread", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Updates the information of a thread identified by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Delete a specific thread", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Deletes a thread identified by its ID from the database." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Get thread history", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/history", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads", ":thread_id", "history"], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Gets the history of the thread identified by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/history", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "history" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/threads/:thread_id/history", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "threads", + ":thread_id", + "history" + ], + "variable": [ + { + "key": "thread_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Create a new thread", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads"] + }, + "description": "Creates a new thread with the provided information. This can optionally be obtained from the api_key. If it is not set in the request, it will attempt to get it from the api_key." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"assistant_id\": \"\",\n \"user_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"assistant_id\": \"\",\n \"user_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/threads", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "threads"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "assistants", + "item": [ + { + "name": "{assistant_id}", + "item": [ + { + "name": "files", + "item": [ + { + "name": "Add an uploaded file to an assistant for RAG.", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.sendRequest({", + " url: pm.environment.get(\"baseUrl\") + \"/api/v1/assistants\",", + " method: 'POST',", + " header: {", + " 'X-API-KEY': pm.environment.get(\"apiKey\"),", + " 'Content-Type': 'application/json'", + " },", + " body: {", + " mode: 'raw',", + " raw: JSON.stringify({", + " \"name\": \"Weather assistant\",", + " \"config\": {", + " \"configurable\": {", + " \"type\": \"chatbot\",", + " \"agent_type\": \"GPT 4o Mini\",", + " \"system_message\": \"You are a helpful weather assistant.\",", + " \"tools\": [\"DDG Search\"],", + " \"llm_type\": \"GPT 4o Mini\"", + " }", + " },", + " \"kwargs\": {", + " \"description\": \"An assistant for weather-related queries\"", + " },", + " \"public\": false", + "})", + " }", + "}, function (err, res) {", + " if (err) {", + " console.log(err);", + " } else {", + " const response = res.json();", + " pm.environment.set(\"assistantId\", response.id);", + " }", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"file_id\": \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}/files", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + "{{assistantId}}", + "files" + ] + }, + "description": "Convenience method to add an uploaded file to an assistant for RAG ingestion and retrieval" + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"file_id\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + ":assistant_id", + "files" + ], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"file_id\": \"\",\n \"assistant_id\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"file_id\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + ":assistant_id", + "files" + ], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve file information for all files associated with an assistant", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.variables.set(\"assistantId\", \"36395fdd-b0e3-4d4f-b9e4-38737cc6cccd\")" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}/files", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + "{{assistantId}}", + "files" + ] + }, + "description": "Returns a list of file objects for all files associated with an assistant." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files?limit=20&order=desc&before=&after=", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + ":assistant_id", + "files" + ], + "query": [ + { + "key": "limit", + "value": "20" + }, + { + "key": "order", + "value": "desc" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + } + ], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n]" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files?limit=20&order=desc&before=&after=", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + ":assistant_id", + "files" + ], + "query": [ + { + "key": "limit", + "value": "20" + }, + { + "key": "order", + "value": "desc" + }, + { + "key": "before", + "value": "" + }, + { + "key": "after", + "value": "" + } + ], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Remove a file from an assistant", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.variables.set(\"assistantId\", \"36395fdd-b0e3-4d4f-b9e4-38737cc6cccd\")", + "pm.variables.set(\"fileId\", \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\")" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}/files/{{fileId}}", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + "{{assistantId}}", + "files", + "{{fileId}}" + ] + }, + "description": "Removes a file from an assistant by its ID. This also deletes the corresponding documents from the vector store." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files/:file_id", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + ":assistant_id", + "files", + ":file_id" + ], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + }, + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id/files/:file_id", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "assistants", + ":assistant_id", + "files", + ":file_id" + ], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + }, + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Retrieve a specific assistant", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.sendRequest({", + " url: pm.environment.get(\"baseUrl\") + \"/api/v1/assistants\",", + " method: 'POST',", + " header: {", + " 'X-API-KEY': pm.environment.get(\"apiKey\"),", + " 'Content-Type': 'application/json'", + " },", + " body: {", + " mode: 'raw',", + " raw: JSON.stringify({", + " \"name\": \"Weather assistant\",", + " \"config\": {", + " \"configurable\": {", + " \"type\": \"chatbot\",", + " \"agent_type\": \"GPT 4o Mini\",", + " \"system_message\": \"You are a helpful weather assistant.\",", + " \"tools\": [\"DDG Search\"],", + " \"llm_type\": \"GPT 4o Mini\"", + " }", + " },", + " \"user_id\": \"asdf\",", + " \"kwargs\": {", + " \"description\": \"An assistant for weather-related queries\"", + " },", + " \"public\": false", + "})", + " }", + "}, function (err, res) {", + " if (err) {", + " console.log(err);", + " } else {", + " const response = res.json();", + " pm.environment.set(\"assistantId\", response.id);", + " }", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", "{{assistantId}}"] + }, + "description": "Retrieves detailed information about a specific assistant by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", ":assistant_id"], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", ":assistant_id"], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Update a specific assistant", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.sendRequest({", + " url: pm.environment.get(\"baseUrl\") + \"/api/v1/assistants\",", + " method: 'POST',", + " header: {", + " 'X-API-KEY': pm.environment.get(\"apiKey\"),", + " 'Content-Type': 'application/json'", + " },", + " body: {", + " mode: 'raw',", + " raw: JSON.stringify({", + " \"name\": \"Weather assistant\",", + " \"config\": {", + " \"configurable\": {", + " \"type\": \"chatbot\",", + " \"agent_type\": \"GPT 4o Mini\",", + " \"system_message\": \"You are a helpful weather assistant.\",", + " \"tools\": [\"DDG Search\"],", + " \"llm_type\": \"GPT 4o Mini\"", + " }", + " },", + " \"user_id\": \"asdf\",", + " \"kwargs\": {", + " \"description\": \"An assistant for weather-related queries\"", + " },", + " \"public\": false", + "})", + " }", + "}, function (err, res) {", + " if (err) {", + " console.log(err);", + " } else {", + " const response = res.json();", + " pm.environment.set(\"assistantId\", response.id);", + " }", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Weather assistant updated\",\n \"config\": {\n \"configurable\": {\n \"type\": \"chatbot\",\n \"agent_type\": \"GPT 4o Mini\",\n \"system_message\": \"You are a helpful weather assistant.\",\n \"tools\": [\"DDG Search\"],\n \"llm_type\": \"GPT 4o Mini\"\n }\n },\n \"user_id\": \"asdf\",\n \"kwargs\": {\n \"description\": \"An assistant for weather-related queries\"\n },\n \"public\": false\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", "{{assistantId}}"] + }, + "description": "Updates the details of a specific assistant by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", ":assistant_id"], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", ":assistant_id"], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Delete a specific assistant", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 204\", function () {", + " pm.response.to.have.status(204);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.variables.set(\"assistantId\", \"cd2a7145-6f36-4456-8fa9-e81be98a2409\")" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/{{assistantId}}", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", "{{assistantId}}"] + }, + "description": "Deletes a specific assistant by its ID from the database." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", ":assistant_id"], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants/:assistant_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants", ":assistant_id"], + "variable": [ + { + "key": "assistant_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Retrieve all assistants", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants"] + }, + "description": "Retrieves a list of all assistants." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/assistants", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n },\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n }\n]" + } + ] + }, + { + "name": "Create a new assistant", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"Weather assistant\",\n \"config\": {\n \"configurable\": {\n \"type\": \"chatbot\",\n \"agent_type\": \"GPT 4o Mini\",\n \"system_message\": \"You are a helpful weather assistant.\",\n \"tools\": [\"DDG Search\"],\n \"llm_type\": \"GPT 4o Mini\"\n }\n },\n \"kwargs\": {\n \"description\": \"An assistant for weather-related queries\"\n },\n \"public\": false\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants"] + }, + "description": "Creates a new assistant with the specified details." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n \"\",\n \"\"\n ],\n \"llm_type\": \"\"\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"name\": \"\",\n \"config\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/assistants", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "assistants"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "rag", + "item": [ + { + "name": "Ingest files to be indexed and queried.", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"files\": [\n \"\",\n \"\"\n ],\n \"purpose\": \"\",\n \"index_name\": \"\",\n \"namespace\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"document_processor\": {\n \"summarize\": false,\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"unstructured\": {\n \"partition_strategy\": \"auto\",\n \"hi_res_model_name\": \"detectron2_onnx\",\n \"process_tables\": false\n },\n \"splitter\": {\n \"name\": \"semantic\",\n \"min_tokens\": 30,\n \"max_tokens\": 800,\n \"rolling_window_size\": 1,\n \"prefix_titles\": true,\n \"prefix_summary\": true\n }\n },\n \"webhook_url\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/ingest", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "ingest"] + }, + "description": "Upload files for ingesting using the advanced RAG system." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"files\": [\n \"\",\n \"\"\n ],\n \"purpose\": \"\",\n \"index_name\": \"\",\n \"namespace\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"document_processor\": {\n \"summarize\": false,\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"unstructured\": {\n \"partition_strategy\": \"auto\",\n \"hi_res_model_name\": \"detectron2_onnx\",\n \"process_tables\": false\n },\n \"splitter\": {\n \"name\": \"semantic\",\n \"min_tokens\": 30,\n \"max_tokens\": 800,\n \"rolling_window_size\": 1,\n \"prefix_titles\": true,\n \"prefix_summary\": true\n }\n },\n \"webhook_url\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/ingest", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "ingest"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "\"\"" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"files\": [\n \"\",\n \"\"\n ],\n \"purpose\": \"\",\n \"index_name\": \"\",\n \"namespace\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"document_processor\": {\n \"summarize\": false,\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"unstructured\": {\n \"partition_strategy\": \"auto\",\n \"hi_res_model_name\": \"detectron2_onnx\",\n \"process_tables\": false\n },\n \"splitter\": {\n \"name\": \"semantic\",\n \"min_tokens\": 30,\n \"max_tokens\": 800,\n \"rolling_window_size\": 1,\n \"prefix_titles\": true,\n \"prefix_summary\": true\n }\n },\n \"webhook_url\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/ingest", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "ingest"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Query documents", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/query", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "query"] + }, + "description": "Query ingested documents using advanced RAG system with unstructured library.
" + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/query", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "query"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"success\": \"\",\n \"data\": [\n {\n \"id\": \"\",\n \"document_id\": \"\",\n \"page_content\": \"\",\n \"file_id\": \"\",\n \"namespace\": \"\",\n \"source\": \"\",\n \"source_type\": \"\",\n \"chunk_index\": \"\",\n \"title\": \"\",\n \"purpose\": \"\",\n \"token_count\": \"\",\n \"page_number\": \"\",\n \"metadata\": \"\",\n \"dense_embedding\": [\n \"\",\n \"\"\n ]\n },\n {\n \"id\": \"\",\n \"document_id\": \"\",\n \"page_content\": \"\",\n \"file_id\": \"\",\n \"namespace\": \"\",\n \"source\": \"\",\n \"source_type\": \"\",\n \"chunk_index\": \"\",\n \"title\": \"\",\n \"purpose\": \"\",\n \"token_count\": \"\",\n \"page_number\": \"\",\n \"metadata\": \"\",\n \"dense_embedding\": [\n \"\",\n \"\"\n ]\n }\n ]\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/query", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "query"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Query Lc Retriever", + "request": { + "auth": { + "type": "apikey", + "apikey": [ + { + "key": "key", + "value": "X-API-KEY", + "type": "string" + }, + { + "key": "value", + "value": "{{apiKey}}", + "type": "string" + }, + { + "key": "in", + "value": "header", + "type": "string" + } + ] + }, + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/query-lc-retriever", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "query-lc-retriever"] + } + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/query-lc-retriever", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "query-lc-retriever"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"input\": \"\",\n \"namespace\": \"\",\n \"context\": \"\",\n \"index_name\": \"\",\n \"vector_database\": {\n \"type\": \"qdrant\",\n \"config\": \"\"\n },\n \"encoder\": {\n \"provider\": \"openai\",\n \"encoder_model\": \"text-embedding-3-small\",\n \"dimensions\": 1536\n },\n \"enable_rerank\": \"\",\n \"interpreter_mode\": \"\",\n \"exclude_fields\": [\n \"\",\n \"\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/rag/query-lc-retriever", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "rag", "query-lc-retriever"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "files", + "item": [ + { + "name": "{file_id}", + "item": [ + { + "name": "Retrieve file information", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.variables.set(\"fileId\", \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\")" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/{{fileId}}", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", "{{fileId}}"] + }, + "description": "Retrieves information about a specific file by its ID." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Delete a specific file", + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Deletes a specific file by its ID from the database and file system. When a file is deleted, it is also removed from any assistants that may be using it and all associated embeddings are deleted from the vector store." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"file_id\": \"\",\n \"num_of_assistants\": \"\",\n \"assistants\": [\n \"\",\n \"\"\n ],\n \"num_of_deleted_chunks\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve the content of a specific file", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "prerequest", + "script": { + "exec": [ + "pm.variables.set(\"fileId\", \"1e538b9d-ef2d-47d4-ad16-5d76080f3e7c\")" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/{{fileId}}/content", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", "{{fileId}}", "content"] + }, + "description": "Retrieves the content of a specific file by its ID. Returns a downloadable file." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id/content", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id", "content"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files/:file_id/content", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files", ":file_id", "content"], + "variable": [ + { + "key": "file_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Upload a file", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [ + "const uuid = require('uuid');", + "", + "pm.variables.set('file_name', uuid.v4());" + ], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 201\", function () {", + " pm.response.to.have.status(201);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "multipart/form-data" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "description": "(Required) The file to upload.", + "type": "file", + "src": "postman-cloud:///1ef379dd-c051-4b10-98ce-f78ec7887dbe" + }, + { + "key": "purpose", + "value": "assistants", + "description": "(Required) The purpose of the file: 'assistants', 'threads', or 'personas'.", + "type": "text" + }, + { + "key": "filename", + "value": "{{file_name}}.pdf", + "description": "The preferred name for the file.", + "type": "text" + }, + { + "key": "kwargs", + "value": "{}", + "description": "Any additonal metadata to include for this file. This should be a JSON string.", + "type": "text" + } + ] + }, + "url": { + "raw": "{{baseUrl}}/api/v1/files", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files"] + }, + "description": "Uploads a file that can be used across various endpoints.
NOTE: MUST INCLUDE `user_id`" + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "description": "(Required) The file to upload.", + "type": "text" + }, + { + "key": "purpose", + "value": "", + "description": "(Required) The purpose of the file: 'assistants', 'threads', or 'personas'.", + "type": "text" + }, + { + "key": "user_id", + "value": "", + "description": "(Required) The user id of the file owner.", + "type": "text" + }, + { + "key": "filename", + "value": "", + "description": "The preferred name for the file.", + "type": "text" + }, + { + "key": "kwargs", + "value": "", + "description": "Any additonal metadata to include for this file. This should be a JSON string.", + "type": "text" + } + ] + }, + "url": { + "raw": "{{baseUrl}}/api/v1/files", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files"] + } + }, + "status": "Created", + "code": 201, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "value": "", + "description": "(Required) The file to upload.", + "type": "text" + }, + { + "key": "purpose", + "value": "", + "description": "(Required) The purpose of the file: 'assistants', 'threads', or 'personas'.", + "type": "text" + }, + { + "key": "user_id", + "value": "", + "description": "(Required) The user id of the file owner.", + "type": "text" + }, + { + "key": "filename", + "value": "", + "description": "The preferred name for the file.", + "type": "text" + }, + { + "key": "kwargs", + "value": "", + "description": "Any additonal metadata to include for this file. This should be a JSON string.", + "type": "text" + } + ] + }, + "url": { + "raw": "{{baseUrl}}/api/v1/files", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve files", + "event": [ + { + "listen": "prerequest", + "script": { + "exec": [""], + "type": "text/javascript", + "packages": {} + } + }, + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files?user_id={{userId}}", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files"], + "query": [ + { + "key": "user_id", + "value": "{{userId}}" + } + ] + }, + "description": "Retrieves a list of files." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files?user_id=&purpose=", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files"], + "query": [ + { + "key": "user_id", + "value": "" + }, + { + "key": "purpose", + "value": "" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"purpose\": \"\",\n \"filename\": \"\",\n \"bytes\": \"\",\n \"mime_type\": \"\",\n \"source\": \"\",\n \"kwargs\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\"\n }\n]" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "X-API-KEY", + "value": "", + "description": "Added as a part of security scheme: apikey" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/files?user_id=&purpose=", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "files"], + "query": [ + { + "key": "user_id", + "value": "" + }, + { + "key": "purpose", + "value": "" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "auth", + "item": [ + { + "name": "Get enabled authentication strategies", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/auth/auth_strategies", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "auth", "auth_strategies"] + }, + "description": "Returns a list of enabled authentication strategies." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://localhost:9000/api/v1/auth/auth_strategies", + "protocol": "http", + "host": ["localhost"], + "port": "9000", + "path": ["api", "v1", "auth", "auth_strategies"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"strategy\": \"\",\n \"client_id\": \"\",\n \"authorization_endpoint\": \"\",\n \"pkce_enabled\": \"\"\n },\n {\n \"strategy\": \"\",\n \"client_id\": \"\",\n \"authorization_endpoint\": \"\",\n \"pkce_enabled\": \"\"\n }\n]" + } + ] + }, + { + "name": "Login", + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"strategy\": \"\",\n \"payload\": {\n \"qui_d7e\": \"\",\n \"mollit4a1\": \"\",\n \"reprehenderit9_2\": \"\",\n \"est_8c\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/auth/login", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "auth", "login"] + }, + "description": "Logs user in, performing auth according to auth strategy." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"strategy\": \"\",\n \"payload\": {\n \"qui_d7e\": \"\",\n \"mollit4a1\": \"\",\n \"reprehenderit9_2\": \"\",\n \"est_8c\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "http://localhost:9000/api/v1/auth/login", + "protocol": "http", + "host": ["localhost"], + "port": "9000", + "path": ["api", "v1", "auth", "login"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"token\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"strategy\": \"\",\n \"payload\": {\n \"qui_d7e\": \"\",\n \"mollit4a1\": \"\",\n \"reprehenderit9_2\": \"\",\n \"est_8c\": \"\"\n }\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/auth/login", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "auth", "login"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Authorize", + "request": { + "method": "POST", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/auth/:strategy/auth?code=", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "auth", ":strategy", "auth"], + "query": [ + { + "key": "code", + "value": "", + "description": "Code returned from OAuth provider for OIDC token exchange" + } + ], + "variable": [ + { + "key": "strategy", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "Callback authorization endpoint used for OAuth providers after authenticating on the provider's login screen." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://localhost:9000/api/v1/auth/:strategy/auth", + "protocol": "http", + "host": ["localhost"], + "port": "9000", + "path": ["api", "v1", "auth", ":strategy", "auth"], + "variable": [ + { + "key": "strategy", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"token\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/auth/:strategy/auth", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "auth", ":strategy", "auth"], + "variable": [ + { + "key": "strategy", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Logout", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/auth/logout", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "auth", "logout"] + }, + "description": "Logs user out, adding the given JWT token to the blacklist." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "http://localhost:9000/api/v1/auth/logout", + "protocol": "http", + "host": ["localhost"], + "port": "9000", + "path": ["api", "v1", "auth", "logout"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + } + ] + } + ] + }, + { + "name": "admin/users", + "item": [ + { + "name": "{user_id}", + "item": [ + { + "name": "Retrieve a specific user", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.have.property('user_id');", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "GET endpoint at `/users/{user_id}` for fetching details of a specific user using its user_id.\n USAGE: Admins can use this endpoint to retrieve details of a specific user.\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Update a specific user ", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.have.property('user_id');", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "PATCH endpoint at `/{user_id}` for updating the details of a specific user.\n USAGE: Admins can use this endpoint to update the details of a specific user.\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve user assistants", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/assistants", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "admin", + "users", + ":user_id", + "assistants" + ], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "Required" + } + ] + }, + "description": "Retrieves a list of the user's assistants." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/assistants", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", "assistants"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n },\n {\n \"id\": \"\",\n \"name\": \"\",\n \"config\": {\n \"configurable\": {\n \"type\": \"agent\",\n \"agent_type\": \"GPT 4o Mini\",\n \"interrupt_before_action\": \"\",\n \"retrieval_description\": \"\",\n \"system_message\": \"\",\n \"tools\": [\n {\n \"value\": \"\"\n },\n {\n \"value\": \"\"\n }\n ],\n \"llm_type\": {\n \"value\": \"\"\n }\n }\n },\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"user_id\": \"\",\n \"kwargs\": \"\",\n \"file_ids\": [\n \"\",\n \"\"\n ],\n \"public\": \"\"\n }\n]" + } + ] + }, + { + "name": "Delete a specific user ", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(204);", + "});", + "" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "DELETE", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "DELETE endpoint at `/users/{user_id}` for removing a specific user using its `user_id`.\n USAGE: Admins can use this endpoint to delete a specific user.\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", ":user_id"], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve threads by user ", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/threads?grouped=&timezoneOffset=", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "admin", + "users", + ":user_id", + "threads" + ], + "query": [ + { + "key": "grouped", + "value": "" + }, + { + "key": "timezoneOffset", + "value": "" + } + ], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + }, + "description": "GET endpoint at `/users/{user_id}/threads` for fetching all threads associated with a specific user using its id.
\n USAGE: Admins can use this endpoint to retrieve all threads associated with a specific user.\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/threads?grouped=&timezoneOffset=", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "admin", + "users", + ":user_id", + "threads" + ], + "query": [ + { + "key": "grouped", + "value": "" + }, + { + "key": "timezoneOffset", + "value": "" + } + ], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n }\n]" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/:user_id/threads?grouped=&timezoneOffset=", + "host": ["{{baseUrl}}"], + "path": [ + "api", + "v1", + "admin", + "users", + ":user_id", + "threads" + ], + "query": [ + { + "key": "grouped", + "value": "" + }, + { + "key": "timezoneOffset", + "value": "" + } + ], + "variable": [ + { + "key": "user_id", + "value": "", + "description": "(Required) " + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "List all users ", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{bearerToken}}", + "type": "string" + } + ] + }, + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users"] + }, + "description": "GET endpoint at `/users` for listing all users.\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n }\n]" + } + ] + }, + { + "name": "Create a new user", + "event": [ + { + "listen": "test", + "script": { + "exec": [ + "pm.test(\"Status code is 200\", function () {", + " pm.response.to.have.status(200);", + "});", + "", + "pm.test(\"Response has valid JSON structure\", function () {", + " pm.response.to.be.json;", + " const responseJson = pm.response.json();", + " pm.expect(responseJson).to.have.property('user_id');", + "});" + ], + "type": "text/javascript", + "packages": {} + } + } + ], + "request": { + "method": "POST", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"user_id\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users"] + }, + "description": "POST endpoint at `/users` for creating a new user.\n If `user_id` is not present, the database will auto-generate a new UUID for the field.\n This is intended to allow for internal users to be correlated with external systems while not exposing the internal database record id for the user.\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\",\n \"user_id\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "POST", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\",\n \"user_id\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve all threads", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/threads", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", "threads"] + }, + "description": "Retrieves a list of all threads in the database.\n Should be used as an admin operation.
\n TODO: Add access control for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/admin/users/threads", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "admin", "users", "threads"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n }\n]" + } + ] + } + ] + }, + { + "name": "users/me", + "item": [ + { + "name": "Retrieve a specific user ", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + }, + "description": "GET endpoint to fetch details of the logged-in user.\n USAGE: Admins can use this endpoint to retrieve details of a specific user.\n TODO: Add RBAC for this endpoint." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" + } + ] + }, + { + "name": "Delete a specific user ", + "request": { + "method": "DELETE", + "header": [], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + }, + "description": "DELETE endpoint for removing the logged-in user from the system.\n This will do a cascade delete on all threads and messages, but will not\n effect assistants created by the user." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "DELETE", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + } + }, + "status": "No Content", + "code": 204, + "_postman_previewlanguage": "text", + "header": [ + { + "key": "Content-Type", + "value": "text/plain" + } + ], + "cookie": [], + "body": "" + } + ] + }, + { + "name": "Update a specific user ", + "request": { + "method": "PATCH", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + }, + "description": "PATCH endpoint for updating the details of the logged-in user." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\"\n}" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "PATCH", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"\",\n \"email\": \"\",\n \"first_name\": \"\",\n \"last_name\": \"\",\n \"kwargs\": \"\",\n \"password\": \"\",\n \"hashed_password\": \"\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/api/v1/users/me", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me"] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + }, + { + "name": "Retrieve threads by user ", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me/threads?grouped=&timezoneOffset=", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me", "threads"], + "query": [ + { + "key": "grouped", + "value": "", + "description": "Group threads into date categories (eg. Today, Yesterday, etc.)" + }, + { + "key": "timezoneOffset", + "value": "", + "description": "Timezone offset in minutes from UTC" + } + ] + }, + "description": "GET endpoint for fetching all threads associated with the logged-in user." + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me/threads?grouped=&timezoneOffset=", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me", "threads"], + "query": [ + { + "key": "grouped", + "value": "" + }, + { + "key": "timezoneOffset", + "value": "" + } + ] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "[\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n },\n {\n \"id\": \"\",\n \"user_id\": \"\",\n \"created_at\": \"\",\n \"updated_at\": \"\",\n \"assistant_id\": \"\",\n \"name\": \"\",\n \"kwargs\": \"\"\n }\n]" + }, + { + "name": "Validation Error", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Authorization", + "value": "Bearer ", + "description": "Added as a part of security scheme: bearer" + }, + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/users/me/threads?grouped=&timezoneOffset=", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "users", "me", "threads"], + "query": [ + { + "key": "grouped", + "value": "" + }, + { + "key": "timezoneOffset", + "value": "" + } + ] + } + }, + "status": "Unprocessable Entity (WebDAV) (RFC 4918)", + "code": 422, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{\n \"detail\": [\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n },\n {\n \"loc\": [\n \"\",\n \"\"\n ],\n \"msg\": \"\",\n \"type\": \"\"\n }\n ]\n}" + } + ] + } + ] + }, + { + "name": "Health Check", + "request": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/health_check", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "health_check"] + } + }, + "response": [ + { + "name": "Successful Response", + "originalRequest": { + "method": "GET", + "header": [ + { + "key": "Accept", + "value": "application/json" + } + ], + "url": { + "raw": "{{baseUrl}}/api/v1/health_check", + "host": ["{{baseUrl}}"], + "path": ["api", "v1", "health_check"] + } + }, + "status": "OK", + "code": 200, + "_postman_previewlanguage": "json", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "cookie": [], + "body": "{}" + } + ] + } + ] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [""] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "packages": {}, + "exec": [""] + } + } + ], + "variable": [ + { + "key": "baseUrl", + "value": "http://localhost:9000", + "type": "string" + } + ] +} diff --git a/stack/tests/integration/openapi.json b/stack/tests/integration/openapi.json index d34244bb..de549bd4 100644 --- a/stack/tests/integration/openapi.json +++ b/stack/tests/integration/openapi.json @@ -11,9 +11,7 @@ "paths": { "/api/v1/runs/stream": { "post": { - "tags": [ - "Runs" - ], + "tags": ["Runs"], "summary": "Stream an LLM run.", "description": "Endpoint to stream an LLM response. If the thread_id is not provided, a new thread will be created as long as the assistant_id is included. \u003Cbr\u003E\n Note that the input should be a list of messages in the format: \u003Cbr\u003E\n content: string \u003Cbr\u003E\n role: string \u003Cbr\u003E\n additional_kwargs: dict \u003Cbr\u003E\n example: bool \u003Cbr\u003E", "operationId": "stream_run", @@ -51,9 +49,7 @@ }, "/api/v1/runs": { "post": { - "tags": [ - "Runs" - ], + "tags": ["Runs"], "summary": "Create a run", "description": "Create a run to be processed by the LLM.", "operationId": "create_run", @@ -99,9 +95,7 @@ }, "/api/v1/runs/input_schema": { "get": { - "tags": [ - "Runs" - ], + "tags": ["Runs"], "summary": "Return the input schema of the runnable.", "description": "Return the input schema of the runnable.", "operationId": "get_input_schema", @@ -127,9 +121,7 @@ }, "/api/v1/runs/output_schema": { "get": { - "tags": [ - "Runs" - ], + "tags": ["Runs"], "summary": "Return the output schema of the runnable.", "description": "Return the output schema of the runnable.", "operationId": "get_output_schema", @@ -155,9 +147,7 @@ }, "/api/v1/runs/config_schema": { "get": { - "tags": [ - "Runs" - ], + "tags": ["Runs"], "summary": "Return the config schema of the runnable.", "description": "Return the config schema of the runnable.", "operationId": "get_config_schema", @@ -183,9 +173,7 @@ }, "/api/v1/runs/title": { "post": { - "tags": [ - "Runs" - ], + "tags": ["Runs"], "summary": "Generate a title to name the thread.", "description": "Generates a title for the conversation by sending a list of interactions to the model.", "operationId": "generate_title", @@ -230,9 +218,7 @@ }, "/api/v1/users/me": { "get": { - "tags": [ - "Users" - ], + "tags": ["Users"], "summary": "Retrieve a specific user ", "description": "GET endpoint to fetch details of the logged-in user.\n USAGE: Admins can use this endpoint to retrieve details of a specific user.\n TODO: Add RBAC for this endpoint.", "operationId": "retrieve_me", @@ -255,9 +241,7 @@ ] }, "delete": { - "tags": [ - "Users" - ], + "tags": ["Users"], "summary": "Delete a specific user ", "description": "DELETE endpoint for removing the logged-in user from the system.\n This will do a cascade delete on all threads and messages, but will not\n effect assistants created by the user.", "operationId": "delete_me", @@ -273,9 +257,7 @@ ] }, "patch": { - "tags": [ - "Users" - ], + "tags": ["Users"], "summary": "Update a specific user ", "description": "PATCH endpoint for updating the details of the logged-in user.", "operationId": "update_me", @@ -320,9 +302,7 @@ }, "/api/v1/users/me/threads": { "get": { - "tags": [ - "Users" - ], + "tags": ["Users"], "summary": "Retrieve threads by user ", "description": "GET endpoint for fetching all threads associated with the logged-in user.", "operationId": "retrieve_threads", @@ -406,9 +386,7 @@ }, "/api/v1/threads": { "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Create a new thread", "description": "Creates a new thread with the provided information. This can optionally be obtained from the api_key. If it is not set in the request, it will attempt to get it from the api_key.", "operationId": "create_thread", @@ -453,9 +431,7 @@ }, "/api/v1/threads/{thread_id}": { "get": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Retrieve a specific thread", "description": "Retrieves detailed information about a thread identified by its ID.", "operationId": "retrieve_thread", @@ -499,9 +475,7 @@ ] }, "patch": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Update a specific thread", "description": "Updates the information of a thread identified by its ID.", "operationId": "update_thread", @@ -555,9 +529,7 @@ ] }, "delete": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Delete a specific thread", "description": "Deletes a thread identified by its ID from the database.", "operationId": "delete_thread", @@ -596,9 +568,7 @@ }, "/api/v1/threads/{thread_id}/state": { "get": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Retrieve thread state", "description": "Retrieves the state of a thread identified by its ID.", "operationId": "retrieve_thread_state", @@ -618,9 +588,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - - } + "schema": {} } } }, @@ -642,9 +610,7 @@ ] }, "post": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Add thread state", "description": "Adds the state of a thread identified by its ID.", "operationId": "add_thread_state", @@ -674,9 +640,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - - } + "schema": {} } } }, @@ -700,9 +664,7 @@ }, "/api/v1/threads/{thread_id}/history": { "get": { - "tags": [ - "Threads" - ], + "tags": ["Threads"], "summary": "Get thread history", "description": "Gets the history of the thread identified by its ID.", "operationId": "get_thread_history", @@ -722,9 +684,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - - } + "schema": {} } } }, @@ -748,9 +708,7 @@ }, "/api/v1/assistants": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Retrieve user assistants", "description": "Retrieves a list of the user's assistants.", "operationId": "retrieve_user_assistants", @@ -777,9 +735,7 @@ ] }, "post": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Create a new assistant", "description": "Creates a new assistant with the specified details.", "operationId": "create_assistant", @@ -824,9 +780,7 @@ }, "/api/v1/assistants/{assistant_id}": { "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Retrieve a specific assistant", "description": "Retrieves detailed information about a specific assistant by its ID.", "operationId": "retrieve_assistant", @@ -871,9 +825,7 @@ ] }, "patch": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Update a specific assistant", "description": "Updates the details of a specific assistant by its ID.", "operationId": "update_assistant", @@ -928,9 +880,7 @@ ] }, "delete": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Delete a specific assistant", "description": "Deletes a specific assistant by its ID from the database.", "operationId": "delete_assistant", @@ -970,9 +920,7 @@ }, "/api/v1/assistants/{assistant_id}/files": { "post": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Add an uploaded file to an assistant for RAG.", "description": "Convenience method to add an uploaded file to an assistant for RAG ingestion and retrieval", "operationId": "create_assistant_file", @@ -1027,9 +975,7 @@ ] }, "get": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Retrieve file information for all files associated with an assistant", "description": "Returns a list of file objects for all files associated with an assistant.", "operationId": "retrieve_assistant_files", @@ -1134,9 +1080,7 @@ }, "/api/v1/assistants/{assistant_id}/files/{file_id}": { "delete": { - "tags": [ - "Assistants" - ], + "tags": ["Assistants"], "summary": "Remove a file from an assistant", "description": "Removes a file from an assistant by its ID. This also deletes the corresponding documents from the vector store.", "operationId": "delete_assistant_file", @@ -1193,9 +1137,7 @@ }, "/api/v1/rag/ingest": { "post": { - "tags": [ - "RAG" - ], + "tags": ["RAG"], "summary": "Ingest files to be indexed and queried.", "description": "Upload files for ingesting using the advanced RAG system.", "operationId": "ingest_data_from_files", @@ -1241,9 +1183,7 @@ }, "/api/v1/rag/query": { "post": { - "tags": [ - "RAG" - ], + "tags": ["RAG"], "summary": "Query documents", "description": "Query ingested documents using advanced RAG system with unstructured library. \u003Cbr\u003E", "operationId": "query_documents", @@ -1288,9 +1228,7 @@ }, "/api/v1/rag/query-lc-retriever": { "post": { - "tags": [ - "RAG" - ], + "tags": ["RAG"], "summary": "Query Lc Retriever", "operationId": "query_lc_retriever_api_v1_rag_query_lc_retriever_post", "requestBody": { @@ -1308,9 +1246,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - - } + "schema": {} } } }, @@ -1334,9 +1270,7 @@ }, "/api/v1/files": { "post": { - "tags": [ - "Files" - ], + "tags": ["Files"], "summary": "Upload a file", "description": "Uploads a file that can be used across various endpoints. \u003Cbr\u003E NOTE: MUST INCLUDE `user_id`", "operationId": "upload_file", @@ -1379,9 +1313,7 @@ ] }, "get": { - "tags": [ - "Files" - ], + "tags": ["Files"], "summary": "Retrieve files", "description": "Retrieves a list of files.", "operationId": "retrieve_files_for_user", @@ -1438,9 +1370,7 @@ }, "/api/v1/files/{file_id}": { "get": { - "tags": [ - "Files" - ], + "tags": ["Files"], "summary": "Retrieve file information", "description": "Retrieves information about a specific file by its ID.", "operationId": "retrieve_file", @@ -1485,9 +1415,7 @@ ] }, "delete": { - "tags": [ - "Files" - ], + "tags": ["Files"], "summary": "Delete a specific file", "description": "Deletes a specific file by its ID from the database and file system. When a file is deleted, it is also removed from any assistants that may be using it and all associated embeddings are deleted from the vector store.", "operationId": "delete_file", @@ -1534,9 +1462,7 @@ }, "/api/v1/files/{file_id}/content": { "get": { - "tags": [ - "Files" - ], + "tags": ["Files"], "summary": "Retrieve the content of a specific file", "description": "Retrieves the content of a specific file by its ID. Returns a downloadable file.", "operationId": "retrieve_file_content", @@ -1557,9 +1483,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - - } + "schema": {} } } }, @@ -1583,9 +1507,7 @@ }, "/api/v1/auth/auth_strategies": { "get": { - "tags": [ - "Authentication" - ], + "tags": ["Authentication"], "summary": "Get enabled authentication strategies", "description": "Returns a list of enabled authentication strategies.", "operationId": "get_auth_strategies", @@ -1614,9 +1536,7 @@ }, "/api/v1/auth/login": { "post": { - "tags": [ - "Authentication" - ], + "tags": ["Authentication"], "summary": "Login", "description": "Logs user in, performing auth according to auth strategy.", "operationId": "login", @@ -1669,9 +1589,7 @@ }, "/api/v1/auth/{strategy}/auth": { "post": { - "tags": [ - "Authentication" - ], + "tags": ["Authentication"], "summary": "Authorize", "description": "Callback authorization endpoint used for OAuth providers after authenticating on the provider's login screen.", "operationId": "authorize", @@ -1728,9 +1646,7 @@ }, "/api/v1/auth/logout": { "get": { - "tags": [ - "Authentication" - ], + "tags": ["Authentication"], "summary": "Logout", "description": "Logs user out, adding the given JWT token to the blacklist.", "operationId": "logout", @@ -1755,9 +1671,7 @@ }, "/api/v1/admin/users": { "get": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "List all users ", "description": "GET endpoint at `/users` for listing all users.\n TODO: Add access control for this endpoint.", "operationId": "retrieve_all_users", @@ -1784,9 +1698,7 @@ ] }, "post": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Create a new user", "description": "POST endpoint at `/users` for creating a new user.\n If `user_id` is not present, the database will auto-generate a new UUID for the field.\n This is intended to allow for internal users to be correlated with external systems while not exposing the internal database record id for the user.\n TODO: Add access control for this endpoint.", "operationId": "create_user", @@ -1831,9 +1743,7 @@ }, "/api/v1/admin/users/{user_id}": { "get": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Retrieve a specific user", "description": "GET endpoint at `/users/{user_id}` for fetching details of a specific user using its user_id.\n USAGE: Admins can use this endpoint to retrieve details of a specific user.\n TODO: Add access control for this endpoint.", "operationId": "retrieve_user", @@ -1884,9 +1794,7 @@ ] }, "patch": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Update a specific user ", "description": "PATCH endpoint at `/{user_id}` for updating the details of a specific user.\n USAGE: Admins can use this endpoint to update the details of a specific user.\n TODO: Add access control for this endpoint.", "operationId": "update_user", @@ -1940,9 +1848,7 @@ ] }, "delete": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Delete a specific user ", "description": "DELETE endpoint at `/users/{user_id}` for removing a specific user using its `user_id`.\n USAGE: Admins can use this endpoint to delete a specific user.\n TODO: Add access control for this endpoint.", "operationId": "delete_user", @@ -1981,9 +1887,7 @@ }, "/api/v1/admin/users/{user_id}/threads": { "get": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Retrieve threads by user ", "description": "GET endpoint at `/users/{user_id}/threads` for fetching all threads associated with a specific user using its id. \u003Cbr\u003E\n USAGE: Admins can use this endpoint to retrieve all threads associated with a specific user.\n TODO: Add access control for this endpoint.", "operationId": "retrieve_user_threads", @@ -2072,9 +1976,7 @@ }, "/api/v1/admin/users/threads": { "get": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Retrieve all threads", "description": "Retrieves a list of all threads in the database.\n Should be used as an admin operation. \u003Cbr\u003E\n TODO: Add access control for this endpoint.", "operationId": "retrieve_all_threads", @@ -2103,9 +2005,7 @@ }, "/api/v1/admin/users/{user_id}/assistants": { "get": { - "tags": [ - "Users (Admin)" - ], + "tags": ["Users (Admin)"], "summary": "Retrieve user assistants", "description": "Retrieves a list of the user's assistants.", "operationId": "retrieve_user_assistants", @@ -2155,9 +2055,7 @@ }, "/api/v1/health_check": { "get": { - "tags": [ - "Health Check" - ], + "tags": ["Health Check"], "summary": "Health Check", "operationId": "health_check_api_v1_health_check_get", "responses": { @@ -2165,9 +2063,7 @@ "description": "Successful Response", "content": { "application/json": { - "schema": { - - } + "schema": {} } } } @@ -2185,12 +2081,12 @@ "AgentType": { "type": "string", "enum": [ - "GPT 3.5 Turbo", + "GPT 4o Mini", "GPT 4 Turbo", "GPT 4o", "GPT 4 (Azure OpenAI)", - "Claude 2", - "Claude 2 (Amazon Bedrock)", + "Anthropic Claude", + "Anthropic Claude (Amazon Bedrock)", "GEMINI", "Ollama" ], @@ -2284,13 +2180,7 @@ } }, "type": "object", - "required": [ - "id", - "name", - "config", - "created_at", - "updated_at" - ], + "required": ["id", "name", "config", "created_at", "updated_at"], "title": "Assistant" }, "BaseDocumentChunk": { @@ -2432,11 +2322,7 @@ } }, "type": "object", - "required": [ - "id", - "document_id", - "page_content" - ], + "required": ["id", "document_id", "page_content"], "title": "BaseDocumentChunk" }, "Body_upload_file": { @@ -2478,19 +2364,12 @@ } }, "type": "object", - "required": [ - "file", - "purpose" - ], + "required": ["file", "purpose"], "title": "Body_upload_file" }, "BotType": { "type": "string", - "enum": [ - "chatbot", - "chat_retrieval", - "agent" - ], + "enum": ["chatbot", "chat_retrieval", "agent"], "title": "BotType" }, "ChatMessage": { @@ -2505,10 +2384,7 @@ } }, "type": "object", - "required": [ - "content", - "type" - ], + "required": ["content", "type"], "title": "ChatMessage" }, "Configurable": { @@ -2531,7 +2407,7 @@ ], "title": "Agent Type", "description": "The type of agent, applicable if the bot type is 'agent'.", - "default": "GPT 3.5 Turbo" + "default": "GPT 4o Mini" }, "interrupt_before_action": { "anyOf": [ @@ -2599,7 +2475,7 @@ ], "title": "LLM Type", "description": "The type of language model, applicable if the bot type is 'chat_retrieval' or 'chatbot'.", - "default": "GPT 3.5 Turbo" + "default": "GPT 4o Mini" } }, "type": "object", @@ -2607,12 +2483,7 @@ }, "ContextType": { "type": "string", - "enum": [ - "assistants", - "threads", - "rag", - "personas" - ], + "enum": ["assistants", "threads", "rag", "personas"], "title": "ContextType", "description": "Context where files or generated embeddings are used." }, @@ -2625,9 +2496,7 @@ } }, "type": "object", - "required": [ - "file_id" - ], + "required": ["file_id"], "title": "CreateAssistantFileSchema" }, "CreateAssistantFileSchemaResponse": { @@ -2644,10 +2513,7 @@ } }, "type": "object", - "required": [ - "file_id", - "assistant_id" - ], + "required": ["file_id", "assistant_id"], "title": "CreateAssistantFileSchemaResponse" }, "CreateAssistantSchema": { @@ -2705,10 +2571,7 @@ } }, "type": "object", - "required": [ - "name", - "config" - ], + "required": ["name", "config"], "title": "CreateAssistantSchema" }, "CreateRunPayload": { @@ -2754,9 +2617,7 @@ } }, "type": "object", - "required": [ - "input" - ], + "required": ["input"], "title": "CreateRunPayload", "description": "Payload for creating a run." }, @@ -2794,9 +2655,7 @@ } }, "type": "object", - "required": [ - "assistant_id" - ], + "required": ["assistant_id"], "title": "CreateThreadSchema" }, "CreateUpdateUserSchema": { @@ -2924,11 +2783,7 @@ } }, "type": "object", - "required": [ - "file_id", - "num_of_assistants", - "assistants" - ], + "required": ["file_id", "num_of_assistants", "assistants"], "title": "DeleteFileResponse" }, "DocumentProcessorConfig": { @@ -3314,9 +3169,7 @@ } }, "type": "object", - "required": [ - "files" - ], + "required": ["files"], "title": "IngestRequestPayload" }, "JWTResponse": { @@ -3327,20 +3180,18 @@ } }, "type": "object", - "required": [ - "token" - ], + "required": ["token"], "title": "JWTResponse" }, "LLMType": { "type": "string", "enum": [ - "GPT 3.5 Turbo", + "GPT 4o Mini", "GPT 4", "GPT 4o", "GPT 4 (Azure OpenAI)", - "Claude 2", - "Claude 2 (Amazon Bedrock)", + "Anthropic Claude", + "Anthropic Claude (Amazon Bedrock)", "GEMINI", "Mixtral", "Ollama" @@ -3411,15 +3262,11 @@ } }, "type": "object", - "required": [ - "strategy" - ], + "required": ["strategy"], "title": "Login" }, "Logout": { - "properties": { - - }, + "properties": {}, "type": "object", "title": "Logout" }, @@ -3544,9 +3391,7 @@ } }, "type": "object", - "required": [ - "input" - ], + "required": ["input"], "title": "QueryRequestPayload" }, "QueryResponsePayload": { @@ -3564,10 +3409,7 @@ } }, "type": "object", - "required": [ - "success", - "data" - ], + "required": ["success", "data"], "title": "QueryResponsePayload" }, "RunnableConfig": { @@ -3586,14 +3428,10 @@ "callbacks": { "anyOf": [ { - "items": { - - }, + "items": {}, "type": "array" }, - { - - }, + {}, { "type": "null" } @@ -3647,19 +3485,14 @@ } }, "type": "object", - "required": [ - "configurable" - ], + "required": ["configurable"], "title": "RunnableConfigurableAlternativesConfig" }, "SplitterConfig": { "properties": { "name": { "type": "string", - "enum": [ - "semantic", - "by_title" - ], + "enum": ["semantic", "by_title"], "title": "Name", "description": "Splitter method", "default": "semantic" @@ -3762,12 +3595,7 @@ } }, "type": "object", - "required": [ - "id", - "user_id", - "created_at", - "updated_at" - ], + "required": ["id", "user_id", "created_at", "updated_at"], "title": "Thread" }, "ThreadPostRequest": { @@ -3801,9 +3629,7 @@ } }, "type": "object", - "required": [ - "values" - ], + "required": ["values"], "title": "ThreadPostRequest", "description": "Payload for adding state to a thread." }, @@ -3831,9 +3657,7 @@ } }, "type": "object", - "required": [ - "thread_id" - ], + "required": ["thread_id"], "title": "TitleRequest" }, "Tools": { @@ -3853,19 +3677,13 @@ "properties": { "partition_strategy": { "type": "string", - "enum": [ - "auto", - "hi_res" - ], + "enum": ["auto", "hi_res"], "title": "Partition Strategy", "default": "auto" }, "hi_res_model_name": { "type": "string", - "enum": [ - "detectron2_onnx", - "chipper" - ], + "enum": ["detectron2_onnx", "chipper"], "title": "Hi Res Model Name", "description": "Only for `hi_res` strategy", "default": "detectron2_onnx" @@ -4074,11 +3892,7 @@ } }, "type": "object", - "required": [ - "user_id", - "created_at", - "updated_at" - ], + "required": ["user_id", "created_at", "updated_at"], "title": "User", "description": "Model representing a registered user in the application." }, @@ -4108,11 +3922,7 @@ } }, "type": "object", - "required": [ - "loc", - "msg", - "type" - ], + "required": ["loc", "msg", "type"], "title": "ValidationError" }, "VectorDatabase": { @@ -4141,9 +3951,7 @@ }, "VectorDatabaseType": { "type": "string", - "enum": [ - "qdrant" - ], + "enum": ["qdrant"], "const": "qdrant", "title": "VectorDatabaseType" } diff --git a/stack/tests/unit/conftest.py b/stack/tests/unit/conftest.py index 360f78f4..20fbcff5 100644 --- a/stack/tests/unit/conftest.py +++ b/stack/tests/unit/conftest.py @@ -78,13 +78,13 @@ def random_schema_assistant() -> Assistant: config={ "configurable": { "type": "agent", - "type==agent/agent_type": "GPT 3.5 Turbo", + "type==agent/agent_type": "GPT 4o Mini", "type==agent/retrieval_description": "Can be used to look up information", "type==agent/system_message": "You are a helpful assistant.", "type==agent/tools": [], - "type==chat_retrieval/llm_type": "GPT 3.5 Turbo", + "type==chat_retrieval/llm_type": "GPT 4o Mini", "type==chat_retrieval/system_message": "You are a helpful assistant.", - "type==chatbot/llm_type": "GPT 3.5 Turbo", + "type==chatbot/llm_type": "GPT 4o Mini", "type==chatbot/system_message": "You are a helpful assistant.", } }, diff --git a/ui/package.json b/ui/package.json index 570ce919..77ba9bd6 100644 --- a/ui/package.json +++ b/ui/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "private": true, "scripts": { - "dev": "next dev", + "dev": "next dev -p 4000", "build": "next build", "start": "next start", "lint": "next lint", diff --git a/ui/src/components/features/build-panel/components/assistant-form.tsx b/ui/src/components/features/build-panel/components/assistant-form.tsx index 4c45e7cb..55a73db5 100644 --- a/ui/src/components/features/build-panel/components/assistant-form.tsx +++ b/ui/src/components/features/build-panel/components/assistant-form.tsx @@ -77,8 +77,8 @@ export function AssistantForm({ form, onSubmit }: TAssistantFormProps) { (config?.definitions.Bot_Type as TSchemaField).enum ?? [] } formName="config.configurable.type" - title="Select architecture" - placeholder="Select architecture" + title="Architecture" + placeholder="Architecture" /> {architectureType && ( <> diff --git a/ui/src/components/features/build-panel/components/create-assistant.tsx b/ui/src/components/features/build-panel/components/create-assistant.tsx index 9bffa472..1cc29e6a 100644 --- a/ui/src/components/features/build-panel/components/create-assistant.tsx +++ b/ui/src/components/features/build-panel/components/create-assistant.tsx @@ -20,8 +20,8 @@ const defaultValues = { configurable: { interrupt_before_action: false, type: "", - agent_type: "GPT 3.5 Turbo", - llm_type: "GPT 3.5 Turbo", + agent_type: "GPT 4o Mini", + llm_type: "GPT 4o Mini", retrieval_description: "", system_message: "", tools: [],