You can directly share the application with other users to have conversations, and the other users can have direct conversations without logging in. Note that this function will consume the balance of the company account, please keep the link!
- QPM
The maximum number of queries per IP address per minute
- Credit
What is the maximum amount of money that can be consumed by the link? If the link is exceeded, it will be banned. -1 indicates no limit.
- Expired
The expiration time of the shared link. After it expires, it will no longer be usable. Not selecting means it will never expire.
- Token Auth
Identity verification server address, if this value is filled in, before each conversation, a request will be sent to the specified server for identity verification
- Sharing link identity authentication
The purpose of sharing link identity authentication is to quickly and securely integrate WorkAiBot's dialog box into your existing system, which can be achieved with only 2 interfaces.
In the login-free link configuration, you can choose to fill in the Authentication
field. This is the root address of a POST
request. After filling in the address, the initialization of the shared link, the start of the conversation, and the end of the conversation will all send a request to the specific interface of the address. The server interface only needs to return whether the verification is successful and does not need to return other data. The format is as follows
- Interface unified response format
{
"success": true,
"message": "ok",
"data": {
"uid": "lqtPb84CYThAaFsnUKsKBLH62TTSo480"
}
}
AIgotowork
will determine whether success
is true
and decide whether to allow the user to continue the operation. This error will be prompted when success
is not true
.
uid
is the user's unique credential and will be used to pull and save conversation records. Please refer to the practical cases below.
- Add additional query to shared link
In the address of the shared link, add an additional parameter: authToken.
AIgotowork
will carry the parameter token=authToken in the body of the authentication interface.
- Chat initialization verification interface
When initializing the conversation, AIgotowork
will send a request to the authentication interface. The parameters carried in the request are:
curl --location --request POST '{{host}}/shareAuth/init' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "{{authToken}}"
}'
- Verification interface before dialogue
Before starting the conversation, AIgotowork
will send a request to the authentication interface. The parameters carried in the request are:
curl --location --request POST '{{host}}/shareAuth/start' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "{{authToken}}",
"question": "User question",
}'
- Dialogue result reporting interface
This interface has no specified return value.
curl --location --request POST '{{host}}/shareAuth/finish' \
--header 'Content-Type: application/json' \
--data-raw '{
"token": "{{authToken}}",
"responseData": [
...
]
}'
responseData complete field description:
type ResponseType = {
moduleType: srting; // module type
moduleName: string; // module name
runningTime?: number; // operation hours
query?: string; // User question/search term
textOutput?: string; // text output
tokens?: number; // Context total tokens
model?: string; // Models used
contextTotalLen?: number; // total context length
totalPoints?: number; // Total consumption of AI points
temperature?: number; // temperature
maxToken?: number; // maxToken
quoteList?: SearchDataResponseItemType[]; // Reference list
historyPreview?: ChatItemType[]; // Contextual preview (history will be cropped)
similarity?: number; // lowest correlation
limit?: number; // Reference upper limit token
cqList?: ClassifyQuestionAgentItemType[]; // Classification question list
cqResult?: string; // Classification problem results
extractDescription?: string; // Content extraction description
extractResult?: Record<string, any>; // Content extraction results
params?: Record<string, any>; // HTTP module params
body?: Record<string, any>; // HTTP module body
headers?: Record<string, any>; // HTTP module headers
httpResult?: Record<string, any>; // HTTP module results
tfSwitchResult?: boolean; // Determinator result
}
- scenes to be used
This authentication method usually helps you embed the share link
directly into your application. Before your application opens the share link, you should splice authToken
and then open it.
In addition to connecting users with existing systems, you can also connect to the Balance
function, deduct the user's balance through the Result Reporting
interface, and check the user's balance through the Pre-dialogue verification interface
.