-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from shy982/functional-updates
Updates to processing logic & Documentation
- Loading branch information
Showing
5 changed files
with
75 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,65 @@ | ||
# Documentation of APIs, Services, and Modules | ||
|
||
# API Documentation | ||
|
||
## Overview | ||
This document outlines the available endpoints in the MediMate Q&A application. The application provides endpoints for processing user messages using different methods, including simple text processing, OpenAI's GPT-3.5 model, and a Retrieval-Augmented Generation (RAG) approach. | ||
|
||
## Endpoints | ||
|
||
### 1. Simple Chat Test | ||
- **Endpoint**: `/v1/chat/simple` | ||
- **Method**: `POST` | ||
- **Description**: A simple test endpoint that capitalizes the last user message. Used primarily for debugging purposes. | ||
- **Request Body**: | ||
- `messages`: Array of message objects. Each message object should contain a `content` key with the message text. | ||
- **Response**: A string with the last message in uppercase. | ||
- **Example Request**: | ||
```json | ||
{ | ||
"messages": [ | ||
{"content": "hello world"} | ||
] | ||
} | ||
``` | ||
|
||
### 2. Chat with GPT-3.5 (No RAG) | ||
- **Endpoint**: `/v1/chat/openai` | ||
- **Method**: `POST` | ||
- **Description**: Processes messages using OpenAI's GPT-3.5 model without RAG, considering the entire conversation history. | ||
- **Query Parameters**: | ||
- `model` (optional): Specifies the GPT model to use. Default is "gpt-3.5-turbo-instruct". | ||
- **Request Body**: | ||
- `messages`: Array of message objects as described above. | ||
- `medicalHistory` (optional): String containing the medical history to be considered in the response. | ||
- **Response**: A string containing the AI-generated response. | ||
- **Example Request**: | ||
```json | ||
{ | ||
"messages": [ | ||
{"content": "What are the symptoms of a cold?"} | ||
], | ||
"medicalHistory": "Patient has a history of allergies." | ||
} | ||
``` | ||
|
||
### 3. Chat with RAG | ||
- **Endpoint**: `/v1/chat/openai/rag` | ||
- **Method**: `POST` | ||
- **Description**: Processes messages using a RAG approach, combining GPT-3.5 and external knowledge retrieval. | ||
- **Query Parameters**: | ||
- `model` (optional): GPT model to use. Default is "gpt-3.5-turbo-instruct". | ||
- `dataset` (optional): The dataset for knowledge retrieval. Default is "nfcorpus". | ||
- **Request Body**: | ||
- `messages`: Array of message objects as described above. | ||
- `medicalHistory` (optional): String containing relevant medical history. | ||
- **Response**: A string containing the AI-generated response with external knowledge context. | ||
- **Example Request**: | ||
```json | ||
{ | ||
"messages": [ | ||
{"content": "Tell me about diabetes management."} | ||
], | ||
"medicalHistory": "Patient has type 2 diabetes." | ||
} | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.