4.1-Introduction to Plugin
1. Introduction to plugin
background: The plugin is implemented based on the ability of large-model function call. The big model automatically determines whether to use the function call function based on user input. If the function call function is used, the function parameters represented in the form of a json (key value) object will be automatically extracted based on the input.
accomplish: Users develop interfaces and deploy them into web services according to a certain functional requirement, and configure this web service information in the robot plugin part of the platform. When using this robot session, the platform will automatically extract the required parameters of the web service based on the conversation content and call it, and then obtain the result and return it to the user in the form of an answer.
2. Platform request description
Request URL:User Configuration
Request method: POST
Content-Type:
application/jsonRequest body description: json object form; all the required parameters of the interface are placed in the json object, and the default values must be set in the interface parameters if the non-necessary parameters are required.
3. User web service response requirements
The user's web service needs to give a suitable json response, and the response body content is explained as follows:
type
string
Yes
markdownorchart
data
-
Yes
type ismarkdownWhen data is the string data that can be rendered using markdown; type ischartWhen data is a graph data that can be rendered using front-end components
markdown
string
No
A string that can be rendered directly using markdown
field_headers
array
No
header field
chart_type
string
No
When type is chart, chart_type can be bar, pie, line, candlestick
dimension
string
No
x-axis field when drawing
desc
string
Yes
A string of describing information
4. Plugin configuration usage
Log in to the platform, select the robot → Plugin Management → Create Plugin → Plugin and Method Configuration