{"openapi":"3.1.0","info":{"title":"GPTStonks Chat CE API","description":"GPTStonks API allows interacting with financial data sources using natural language.\n\n# Features\nThe API provides the following features to its users:\n\n- Latest news search via [DuckDuckGo](https://duckduckgo.com/).\n- Updated financial data via [OpenBB](https://openbb.co/): equities, cryptos, ETFs, currencies...\n- General knowledge learned during the training of the LLM, dependable on the model.\n- Fast local deployment with updated Docker images ([DockerHub](https://hub.docker.com/r/gptstonks/api)).\n\n# Supported AI models\nThe following models are supported:\n\n- [Llama.cpp](https://github.com/ggerganov/llama.cpp) optimized models: Llama 2, Mixtral, Zephyr...\n- [HuggingFace](https://huggingface.co/models?pipeline_tag=text-generation&sort=trending) models, including quantized versions, such as Mixtral GPTQ, Phi-2, etc.\n- [Amazon Bedrock](https://aws.amazon.com/bedrock/) LLMs.\n- [OpenAI](https://platform.openai.com/docs/models) instruct and chat LLMs (e.g., gpt-3.5-turbo-1106 or gpt-4-turbo-preview).\n- Multiple text embedding models on Hugging Face and OpenAI Ada 2 embeddings.\n- [Vertex AI](https://cloud.google.com/vertex-ai) LLMs (alpha version).\n","contact":{"name":"GPTStonks, part of Mitheithel","email":"contact@mitheithel.com"},"license":{"name":"MIT","identifier":"MIT"},"version":"0.0.2"},"paths":{"/tokens/":{"get":{"tags":["tokens","tokens"],"summary":"Get Token","description":"Get the token used to access OpenBB.\n\nReturns:\n `TokenResponse`: token for OpenBB.","operationId":"get_token_tokens__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}}}},"post":{"tags":["tokens","tokens"],"summary":"Update Token","description":"Update the token used to access OpenBB.\n\nArgs:\n token_data (`TokenData`): Token data information to update the database.\n\nReturns:\n `MessageResponse`: message indicating success.","operationId":"update_token_tokens__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenData"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/process_query_async":{"post":{"summary":"Process Query Async","description":"Asynchronous endpoint to start processing the given query. The processing runs in the\nbackground and the result is eventually returned.\n\nArgs:\n request (`Request`): FastAPI request object containing the query to be processed.\n query_in (`QueryIn`): validated query by the user.\n\nReturns:\n `BaseAgentResponse | DataAgentResponse`: the standard response by the API.","operationId":"process_query_async_process_query_async_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/BaseAgentResponse"},{"$ref":"#/components/schemas/DataAgentResponse"}],"title":"Response Process Query Async Process Query Async Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BaseAgentResponse":{"properties":{"type":{"type":"string","title":"Type"},"body":{"type":"string","title":"Body"}},"type":"object","required":["type","body"],"title":"BaseAgentResponse","description":"Model to define the base response parameters."},"DataAgentResponse":{"properties":{"type":{"type":"string","title":"Type"},"body":{"type":"string","title":"Body"},"result_data":{"items":{"type":"object"},"type":"array","title":"Result Data"}},"type":"object","required":["type","body","result_data"],"title":"DataAgentResponse","description":"Model to define the data response parameters."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"MessageResponse","description":"Model to define a general response with any custom message."},"QueryIn":{"properties":{"query":{"type":"string","title":"Query"}},"type":"object","required":["query"],"title":"QueryIn","description":"Model to define the main query parameters."},"TokenData":{"properties":{"openbb":{"type":"string","title":"Openbb"}},"type":"object","required":["openbb"],"title":"TokenData","description":"Model to define the list of tokens available."},"TokenResponse":{"properties":{"openbb":{"type":"string","title":"Openbb"}},"type":"object","required":["openbb"],"title":"TokenResponse","description":"Model to define the tokens' endpoint response."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}}}