GPTStonks Chat CE API 0.0.2¶
GPTStonks API allows interacting with financial data sources using natural language.
Features¶
The API provides the following features to its users:
- Latest news search via DuckDuckGo.
- Updated financial data via OpenBB: equities, cryptos, ETFs, currencies...
- General knowledge learned during the training of the LLM, dependable on the model.
- Fast local deployment with updated Docker images (DockerHub).
Supported AI models¶
The following models are supported:
- Llama.cpp optimized models: Llama 2, Mixtral, Zephyr...
- HuggingFace models, including quantized versions, such as Mixtral GPTQ, Phi-2, etc.
- Amazon Bedrock LLMs.
- OpenAI instruct and chat LLMs (e.g., gpt-3.5-turbo-1106 or gpt-4-turbo-preview).
- Multiple text embedding models on Hugging Face and OpenAI Ada 2 embeddings.
- Vertex AI LLMs (alpha version).
tokens¶
GET /tokens/¶
Get Token
Get the token used to access OpenBB.
Returns: TokenResponse
: token for OpenBB.
Responses
200 Successful Response
POST /tokens/¶
Update Token
Update the token used to access OpenBB.
Args: token_data (TokenData
): Token data information to update the database.
Returns: MessageResponse
: message indicating success.
Request body
Responses
200 Successful Response
422 Validation Error
Endpoints¶
POST /process_query_async¶
Process Query Async
Asynchronous endpoint to start processing the given query. The processing runs in the background and the result is eventually returned.
Args: request (Request
): FastAPI request object containing the query to be processed. query_in (QueryIn
): validated query by the user.
Returns: BaseAgentResponse | DataAgentResponse
: the standard response by the API.
Request body
Responses
200 Successful Response
422 Validation Error
Schemas¶
BaseAgentResponse¶
Name | Type |
---|---|
body | string |
type | string |
DataAgentResponse¶
Name | Type |
---|---|
body | string |
result_data | Array<> |
type | string |
HTTPValidationError¶
Name | Type |
---|---|
detail | Array<Schema(ValidationError)> |
MessageResponse¶
Name | Type |
---|---|
message | string |
QueryIn¶
Name | Type |
---|---|
query | string |
TokenData¶
Name | Type |
---|---|
openbb | string |
TokenResponse¶
Name | Type |
---|---|
openbb | string |
ValidationError¶
Name | Type |
---|---|
loc | Array<> |
msg | string |
type | string |