added more todos on endpoints

This commit is contained in:
andzejsp 2023-05-07 17:03:13 +03:00
parent b89ba2e2e5
commit b6e9af166f

View File

@ -239,6 +239,124 @@ This Flask server provides various endpoints to manage and interact with the cha
- "/settings": GET request endpoint to display the settings page.
- "/help": GET request endpoint to display the help page.
## TODO Endpoints:
Here we list needed endpoints on th ebackend to make UI work as expected.
- "/get_all_personalities": GET request endpoint to get all personalities array
>This one should either return the names of installed personalieties or return same data what `"/get_current_personality"` returns.
```
[
"personality": {
"ai_message_prefix": "###gpt4all:\n",
"anti_prompts": [
"###user",
"### user",
"###gpt4all",
"### gpt4all"
],
"assets_list": [
"personalities\\english\\generic\\gpt4all\\assets\\logo.png"
],
"author": "ParisNeo",
"category": "General",
"dependencies": [],
"disclaimer": "",
"language": "en_XX",
"link_text": "\n",
"model_n_predicts": 1024,
"model_repeat_last_n": 40,
"model_repeat_penalty": 1.0,
"model_temperature": 0.6,
"model_top_k": 50,
"model_top_p": 0.9,
"name": "gpt4all",
"personality_conditioning": "## Information:\nAssistant's name is gpt4all\nToday's date is {{date}}\n## Instructions:\nYour mission is to assist user to perform various tasks and answer his questions\n",
"personality_description": "This personality is a helpful and Kind AI ready to help you solve your problems \n",
"user_message_prefix": "###user:\n",
"user_name": "user",
"version": "1.0.0",
"welcome_message": "Welcome! My name is gpt4all.\nHow can I help you today?\n"
},
"personality": {
"ai_message_prefix": "###gpt4all:\n",
"anti_prompts": [
"###user",
"### user",
"###gpt4all",
"### gpt4all"
],
"assets_list": [
"personalities\\english\\generic\\gpt4all\\assets\\logo.png"
],
"author": "ParisNeo",
"category": "General",
"dependencies": [],
"disclaimer": "",
"language": "en_XX",
"link_text": "\n",
"model_n_predicts": 1024,
"model_repeat_last_n": 40,
"model_repeat_penalty": 1.0,
"model_temperature": 0.6,
"model_top_k": 50,
"model_top_p": 0.9,
"name": "gpt4all2",
"personality_conditioning": "## Information:\nAssistant's name is gpt4all\nToday's date is {{date}}\n## Instructions:\nYour mission is to assist user to perform various tasks and answer his questions\n",
"personality_description": "This personality is a helpful and Kind AI ready to help you solve your problems \n",
"user_message_prefix": "###user:\n",
"user_name": "user",
"version": "1.0.0",
"welcome_message": "Welcome! My name is gpt4all.\nHow can I help you today?\n"
},
...
]
```
OR
```
[
"gpt4all",
"gpt4all2",
...
]
```
- "/get_personality": GET request endpoint to get speciffic data based on request
Idea here is to get requested data on demand.. sometimes you want to get only assets, and match them by name from message object in discussions.
> Request body:
```
{
"name",
"assets_list",
"author",
...
}
```
> Response:
[
{
"name":"gpt4all"
"assets_list":['img1','sfx2']
"author":"ParisNeo"
},
{
"name":"gpt4all2"
"assets_list":['sfx1']
"author":"Lemon"
},
...
]
# Socketio endpoints
These are the WebSocket server endpoints that are used to handle real-time communication between the client and server using the SocketIO library.