API Spec
Login route
Handles login with email or provider.
query Parameters
provider required | string Enum: "email" "github" Provider for authentication |
next | string Next URL after successful login |
Request Body schema: application/json
email required | string |
password required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "email": "jaime@example.com",
- "password": "password123"
}
Login route
Handles login with email or provider.
query Parameters
provider required | string Enum: "email" "github" Provider for authentication |
next | string Next URL after successful login |
Request Body schema: application/json
email required | string |
password required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "email": "jaime@example.com",
- "password": "password123"
}
Create a new user
Registers a new user with first name, last name, email, and password.
Request Body schema: application/json
email required | string |
first_name required | string |
last_name required | string |
password required | string |
Responses
Request samples
- Payload
Content type
application/json
{- "email": "jaime@example.com",
- "first_name": "Jaime",
- "last_name": "Nguyen",
- "password": "password123"
}
Logs the event to the database. See Swagger docs for more information.
Logs the event to the database.
Request Body schema: application/json
event required | string |
metadata required | object |
Responses
Request samples
- Payload
Content type
application/json
{- "event": "User logged in",
- "metadata": {
- "time_lapse": 1708,
- "userID": 12345
}
}
Log a suggestion
Logs a suggestion to the database.
Request Body schema: application/json
hasBug required | boolean |
model required | string |
prompt required | string |
suggestionText required | string |
userSectionid | string |
Responses
Request samples
- Payload
Content type
application/json
{- "hasBug": false,
- "model": "gpt-3",
- "prompt": "function add(a, b)",
- "suggestionText": "{\n return a + b;\n}",
- "userSectionid": "12345"
}
Generate a suggestion based on the provided prompt. See Swagger docs for more information.
Sends a prompt to the locally running Ollama model with an optional model name and correctness flag, returning the generated suggestion.
Request Body schema: application/json
model | string The AI model to use for generating the suggestion. |
parameters | object A flag indicating whether the suggestion should be correct. |
prompt required | string |
vendor | string |
Responses
Request samples
- Payload
Content type
application/json
{- "model": "codellama:7b",
- "parameters": {
- "top_k": 0.2
}, - "prompt": "def add(a, b):",
- "vendor": "ollama"
}
Response samples
- 200
- 400
- 500
Content type
application/json
{- "suggestions": [
- "return a + b"
]
}