This operation retrieves relevant regulations that match a user’s input. After you submit a question, a Large Language Model (LLM) analyzes it and retrieves the corresponding regulatory provisions.
Operation description
Before using this API, make sure that you fully understand the billing methods and pricing of the Farui product.
- This API requires activation of the pay-as-you-go service for Farui products (activation is free of charge). You can use the AccessKey and AccessSecret of this account to call our OpenAPI service.
- The service response is returned as a stream through Server-Sent Events (SSE).
- Calling this API requires workspace permissions on the Alibaba Cloud Model Studio platform.
Debugging
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
Authorization information
No authorization information is available for this API.
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | No | The workspace ID of Alibaba Cloud Model Studio. | llm-kqtrcpdee4xm29 |
| appId | string | No | The application ID. | farui |
| thread | object | No | The thread. | |
| messages | array<object> | No | The request context. | |
| object | No | The request context. | ||
| content | string | No | The conversation content. | A friend borrowed 100,000 yuan from me and agreed to repay it within two months without interest. More than half a year has passed and he still has not repaid. Can I demand additional interest? |
| role | string | No | The role in the conversation. | user |
| query | string | Yes | The question to search. | Labor Law |
| queryKeywords | array | No | The array of keywords. | |
| string | No | The keyword. | ["theft","robbery"] | |
| pageParam | object | No | The paging parameters. | |
| pageNumber | integer | No | The page number. | 1 |
| pageSize | integer | No | The page size. Default is 10. Maximum is 50. | 10 |
| filterCondition | object | No | The filter conditions. | |
| lawName | string | No | The law or regulation name. | Labor Law |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | Id of the request | 05062567-EB51-50F6-AF56-0BE44955848D |
| data | object | The response data. | |
| currentPage | integer | The page number. | 1 |
| lawResult | array<object> | The law search result objects. | |
| Law result | object | The law search results. | |
| lawDomain | object | The law information. | |
| abolitionBasis | string | The content of the basis for abolition. | [{\"lawId\":\"chl542s333.txt\",\"times\":\"20170309\",\"lawName\":\"Notice of the Supreme People's Court on Implementing the Revised Guiding Opinions on Sentencing for Common Crimes\"}]" |
| implementYearMonthDate | string | The effective date. | January 3, 2014 |
| invalidBasis | string | The basis for invalidation. | null |
| issuingNo | string | The document number. | "" |
| issuingOrgan | string | The issuing authority. | "{\"level1Name\":\"Supreme People's Court\",\"level1Id\":\"6\"}" |
| lawId | string | The law ID. | b2274825c8c3bc2343ca73680243ddc8 |
| lawItemId | string | The legal provision ID. | ccc209683be1509676174fd6890f24b8 |
| lawName | string | The law or regulation name. | Guiding Opinions of the Supreme People's Court on Sentencing for Common Crimes |
| lawOrder | string | The legal provision name. | Article 263 |
| lawTitle | string | The law or regulation title. | Guiding Opinions of the Supreme People's Court on Sentencing for Common Crimes, Article 263 |
| modifyBasis | string | The basis for modification. | "[]" |
| potencyLevel | string | The legal effect level. | "{\"level2Name\":\"Documents of the Supreme People's Court and Supreme People's Procuratorate\",\"level1Name\":\"Judicial Interpretation\",\"level2Id\":\"002004\",\"level1Id\":\"002004\"}" |
| releaseYearMonthDate | string | The release date. | January 3, 2014 |
| thematicClassify | string | The thematic classification. | null |
| lawSourceContent | string | The full text of the law or regulation. | Article 263... |
| timeliness | string | The timeliness status. | Abolished/Invalid |
| similarity | string | The similarity score. | 0.0050 |
| pageSize | integer | The page size. | 0 |
| query | string | The search query. | robbery |
| queryKeywords | array | The array of keywords. | |
| Keyword | string | The keyword. | ["robbery"] |
| sortKeyAndDirection | object | The search sort fields. | |
| similarity | string | The sort order for similarity: desc or asc | desc |
| releaseYearMonthDate | string | The sort order for release date: desc or asc | desc |
| totalCount | long | The total number of records. | 0 |
| httpStatusCode | long | The HTTP status code. | 200 |
| success | boolean | Indicates whether the call was successful. true: The call was successful. false: The call failed. | true |
| message | string | The error message. | System error (empty when the API call is normal) |
| code | string | The error code. | Ok |
Examples
Success response
JSON format