You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The theme of this version, the project design page supports large model input conversion, text conversion graphics
Motivation
This version is to support the mature large language model in the community and support text to graphics.
Integrate with the model API through the link and memory functions provided by langchain.
Integrate langchain with big model
Provide selection model function (ChatGLM/GPT3.5/GPT4)
Provide clear context memory function
Provide text conversion graphics, graphics to generate local file functions.
Provides drag and drop to generate graphics into the canvas
Implementation
Business structure
User path: login -> click project -> enter the design page -> select canvas -> select model input
Model input -> model type can be selected
Model input -> support context awareness, can clear session
Model input -> text box input plus data to generate graphics
Technology Architecture
architecture design
Create a Flask route to handle model input requests.
Receive user input and pass it to langchain.
Use the chain function and memory management function of langchain to call the corresponding language model according to user input.
Return the output of the model to the client.
technical realization
The user enters a command or question in the front-end model application.
The front-end application sends commands to the /generate interface of the Flask server.
The Flask server processes the request and calls the OpenAI API to generate Python code.
The OpenAI API returns the generated Python code, which the server sends back to the front-end application as a response.
The front-end application receives the generated Python code and sends it to the server for execution. Requests to execute code are sent to a generic proxy interface /api/path:path that forwards requests to another locally running service that executes code and manages the Jupyter kernel.
The Flask server executes the code (in a Jupyter kernel) and returns the result to the front-end application.
The front-end application receives the execution result and displays the output on the chat interface according to the result type. For example, if the result is an image, display it as an image; if it is text, display it as text.
interface documentation
POST /solidui/models/generate
Function: Submit a query to the specified language model.
Request parameters:
modelId : The ID of the language model to use (eg, gpt-3.5, gpt-4, or chatglm).
prompt : prompt.
GET /solidui/models/keys
Function: Returns a list of supported models.
POST /solidui/models/api/path:path
Function: Generate content and send it to the server. For example, if the result is an image, it will be displayed in image form; if it is text, it will be displayed in text form.
Compatibility, deprecation, and migration planning
What impact( if any)will there be on existing users?
The user does not need to select a static legend on the design page, and converts the graphics according to the text in the canvas input box
If we are changing behavior, how will we phase out old behavior?
Does not extend old behavior, does not add new preset legends
Do you need special migration tools?
None
When do we remove existing behavior?
No, I think the current method should be preserved and not expanded. If there is a partner to expand, let him raise an issue. The core of the project is to convert text into graphics based on the large model
2023.7.1 ~ 2023.7.8 The model module code is built
2023.7.9 ~ 2023.7.15 Model related interface and joint debugging
2023.7.16 ~ 2023.7.22 The model-related interface has been developed
2023.7.23 ~ 2023.7.29 The model-related interface has been developed
2023.7.30 ~ 2023.8.5 Medium priority feature development
2023.8.6 ~ 2023.8.14 Medium priority feature development
2023.8.15 ~ 2023.8.27 Documentation and Testing
2023.8.28 ~ 2023.8.31 Publishing, operation stage
Background
The theme of this version, the project design page supports large model input conversion, text conversion graphics
Motivation
This version is to support the mature large language model in the community and support text to graphics.
Integrate with the model API through the link and memory functions provided by langchain.
Integrate langchain with big model
Provide selection model function (ChatGLM/GPT3.5/GPT4)
Provide clear context memory function
Provide text conversion graphics, graphics to generate local file functions.
Provides drag and drop to generate graphics into the canvas
Implementation
Business structure
User path: login -> click project -> enter the design page -> select canvas -> select model input
Technology Architecture
POST /solidui/models/generate
Function: Submit a query to the specified language model.
Request parameters:
modelId : The ID of the language model to use (eg, gpt-3.5, gpt-4, or chatglm).
prompt : prompt.
GET /solidui/models/keys
Function: Returns a list of supported models.
POST /solidui/models/api/path:path
Function: Generate content and send it to the server. For example, if the result is an image, it will be displayed in image form; if it is text, it will be displayed in text form.
![image](https://private-user-images.githubusercontent.com/16789827/248352302-7105df33-8d5d-4fe4-88cc-cee5b4ccc242.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzMzk0NDcsIm5iZiI6MTcyMDMzOTE0NywicGF0aCI6Ii8xNjc4OTgyNy8yNDgzNTIzMDItNzEwNWRmMzMtOGQ1ZC00ZmU0LTg4Y2MtY2VlNWI0Y2NjMjQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzA3VDA3NTkwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNiOTEyZDdiMmUxYjMyZmIyNGMwYmYxMGZhYjA4MDRjOGJjY2MwZDc0Y2E3MjczODE1MTdmYTVlM2UzMTIxODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.O9sSl3nPrYAZZoY-FdZLoWqDVVBdcp9O78sGpABqHKE)
{
"code": 0,
"msg": "成功",
"data": [
{
"type": "image/png",
"value": ""
}
],
"success": true,
"failed": false
}
Compatibility, deprecation, and migration planning
What impact( if any)will there be on existing users?
The user does not need to select a static legend on the design page, and converts the graphics according to the text in the canvas input box
If we are changing behavior, how will we phase out old behavior?
Does not extend old behavior, does not add new preset legends
Do you need special migration tools?
None
When do we remove existing behavior?
No, I think the current method should be preserved and not expanded. If there is a partner to expand, let him raise an issue. The core of the project is to convert text into graphics based on the large model
Test plan
https://github.com/CloudOrc/SolidUI-Doc/tree/main/en_US/Test_Documentation/TestCase
Development Process
2023.7.1 ~ 2023.7.8 The model module code is built
2023.7.9 ~ 2023.7.15 Model related interface and joint debugging
2023.7.16 ~ 2023.7.22 The model-related interface has been developed
2023.7.23 ~ 2023.7.29 The model-related interface has been developed
2023.7.30 ~ 2023.8.5 Medium priority feature development
2023.8.6 ~ 2023.8.14 Medium priority feature development
2023.8.15 ~ 2023.8.27 Documentation and Testing
2023.8.28 ~ 2023.8.31 Publishing, operation stage
Issue list
[{"x":"A","y":5},{"x":"B","y":8},{"x":"C","y":12},{"x":"D","y":6},{"x":"E","y":15},{"x":"F","y":10}]
The text was updated successfully, but these errors were encountered: