-
Notifications
You must be signed in to change notification settings - Fork 0
API Documentation
This document provides a brief overview of the API endpoints related to the 'user' in our application.
This endpoint is used to create a new user in our system.
Request Body
-
first_name: The user's first name. -
last_name: The user's last name. -
password: User's password. -
income: User's income. -
location: User's location. -
Debt_IDs: A list of debt identifier that user owns. -
investment_IDs: A list of investment identifier that user has made.
Response
- The newly created user data.
This endpoint is used to get the user's data by ID.
Request Parameter
-
id: The ID of the user you want to retrieve.
Response
- The user data.
This endpoint is used to update an existing user.
Request Parameters
-
id: The ID of the user you want to update.
Request Body
- The fields you want to update.
Response
- The updated user data.
This endpoint is used to add a Debt ID to the list of debt IDs in user.
Request Parameters
-
id: The ID of the user you want to add debt to.
Request Body
-
Debt_IDs: An array containing the ID(s) of the new debt(s) you want to add.
Response
- The updated user data with the added debt ID.
Please reach out if you have any problems or require further clarifications using these endpoints.
This document offers a concise summary of the API endpoints related to 'investment' in our application.
This endpoint is used to create a new investment in our system.
Request Body
-
index_fund_ID: The ID of the index fund in which the investment is made. -
shares: The number of shares purchased. -
initial_dollar_amount: The initial dollar amount invested. -
initial_investment_date: The date when the initial investment was made.
Response
- The newly created investment data.
This endpoint enables you to retrieve a particular investment using its ID.
Request Parameter
-
id: The ID of the investment you wish to retrieve.
Response
- The requested investment data.
This endpoint is used to update an existing investment's details.
Request Parameters
-
id: The ID of the investment you intend to update.
Request Body
- The fields that you wish to update.
Response
- The updated investment data.
This endpoint is used to delete a particular investment using its ID.
Request Parameters
-
id: The ID of the investment you wish to delete.
Response
- The data of the investment that was deleted.
This endpoint is used to add an investment ID to the list of investment IDs.
Request Parameters
-
id: The ID of the investment you wish to relate to.
Request Body
-
investment_IDs: An array containing the new investment ID(s) you wish to add.
Response
- The updated investment data with the new investment ID listed.
Feel free to reach out if you encounter any issues or need further clarification on these endpoints.
This document presents a brief overview of the API endpoints related to the 'debt' in our application.
This endpoint allows you to create a new debt our system.
Request Body
-
name: The name of the debt. -
amount: The amount of the debt. -
interest: The interest rate on the debt. -
category: The category of the debt.
Response
- The newly created debt data.
This endpoint allows you to retrieve a specific debt using its ID.
Request Parameter
-
id: The ID of the debt you wish to retrieve.
Response
- The debt data.
This endpoint is used to update the details of an existing debt.
Request Parameters
-
id: The ID of the debt you want to update.
Request Body
- The fields you want to update.
Response
- The updated debt data.
This endpoint is used to delete a specific debt using its ID.
Request Parameters
-
id: The ID of the debt you wish to delete.
Response
This document outlines the usage of the endpoints that are integrated into the OpenAI Router. There are two routes that are created for different versions of the GPT models - gpt4 and gpt3.
This endpoint will provide you with the response from the GPT-4 chatbot.
-
prompt: Contains the opening text sent by the system. This could be a brief description for the tasks to be performed. -
input: The user's question or reply to the prompt text.
The API will return the content provided by the GPT-4 model.
POST /gpt4
{
"prompt": "Translate the following English text to French:",
"input": "Hello, how are you?"
}
This endpoint will provide you with the response from the GPT-3.5-turbo chatbot.
-
prompt: Contains the opening text sent by the system. This again is a brief description for the tasks to be performed. -
input: The user's question or reply to the prompt text.
This API will return the content that is provided by the GPT-3.5-turbo model.
POST /gpt3
{
"prompt": "Translate the following English text to Spanish:",
"input": "Hello, how are you?"
}
For both the /gpt4 and /gpt3, if the server or the model encounters an error, this error will be logged into the console for debugging.
Please ensure that your OpenAI API key is stored safely in your .env file and that the names are correctly referenced.
Should you encounter any issues or require deeper clarification regarding these endpoints, please feel free to reach out.