Skip to main content

RunSearchLawQuery

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

POST /{workspaceId}/farui/search/law/query HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringNo

The workspace ID of Alibaba Cloud Model Studio.

llm-kqtrcpdee4xm29
appIdstringNo

The application ID.

farui
threadobjectNo

The thread.

messagesarray<object>No

The request context.

objectNo

The request context.

contentstringNo

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?
rolestringNo

The role in the conversation.

user
querystringYes

The question to search.

Labor Law
queryKeywordsarrayNo

The array of keywords.

stringNo

The keyword.

["theft","robbery"]
pageParamobjectNo

The paging parameters.

pageNumberintegerNo

The page number.

1
pageSizeintegerNo

The page size. Default is 10. Maximum is 50.

10
filterConditionobjectNo

The filter conditions.

lawNamestringNo

The law or regulation name.

Labor Law

Response parameters

NameTypeDescriptionExample
object

Schema of Response

requestIdstring

Id of the request

05062567-EB51-50F6-AF56-0BE44955848D
dataobject

The response data.

currentPageinteger

The page number.

1
lawResultarray<object>

The law search result objects.

Law resultobject

The law search results.

lawDomainobject

The law information.

abolitionBasisstring

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\"}]"
implementYearMonthDatestring

The effective date.

January 3, 2014
invalidBasisstring

The basis for invalidation.

null
issuingNostring

The document number.

""
issuingOrganstring

The issuing authority.

"{\"level1Name\":\"Supreme People's Court\",\"level1Id\":\"6\"}"
lawIdstring

The law ID.

b2274825c8c3bc2343ca73680243ddc8
lawItemIdstring

The legal provision ID.

ccc209683be1509676174fd6890f24b8
lawNamestring

The law or regulation name.

Guiding Opinions of the Supreme People's Court on Sentencing for Common Crimes
lawOrderstring

The legal provision name.

Article 263
lawTitlestring

The law or regulation title.

Guiding Opinions of the Supreme People's Court on Sentencing for Common Crimes, Article 263
modifyBasisstring

The basis for modification.

"[]"
potencyLevelstring

The legal effect level.

"{\"level2Name\":\"Documents of the Supreme People's Court and Supreme People's Procuratorate\",\"level1Name\":\"Judicial Interpretation\",\"level2Id\":\"002004\",\"level1Id\":\"002004\"}"
releaseYearMonthDatestring

The release date.

January 3, 2014
thematicClassifystring

The thematic classification.

null
lawSourceContentstring

The full text of the law or regulation.

Article 263...
timelinessstring

The timeliness status.

Abolished/Invalid
similaritystring

The similarity score.

0.0050
pageSizeinteger

The page size.

0
querystring

The search query.

robbery
queryKeywordsarray

The array of keywords.

Keywordstring

The keyword.

["robbery"]
sortKeyAndDirectionobject

The search sort fields.

similaritystring

The sort order for similarity: desc or asc

desc
releaseYearMonthDatestring

The sort order for release date: desc or asc

desc
totalCountlong

The total number of records.

0
httpStatusCodelong

The HTTP status code.

200
successboolean

Indicates whether the call was successful. true: The call was successful. false: The call failed.

true
messagestring

The error message.

System error (empty when the API call is normal)
codestring

The error code.

Ok

Examples

Success response JSON format
{
  "requestId": "05062567-EB51-50F6-AF56-0BE44955848D",
  "data": {
    "currentPage": 1,
    "lawResult": [
      {
        "lawDomain": {
          "abolitionBasis": "[{\\\"lawId\\\":\\\"chl542s333.txt\\\",\\\"times\\\":\\\"20170309\\\",\\\"lawName\\\":\\\"最高人民法院关于实施修订后的《关于常见犯罪的量刑指导意见》的通知\\\"}]\"",
          "implementYearMonthDate": "2014年01月03日",
          "invalidBasis": null,
          "issuingNo": "",
          "issuingOrgan": {
            "level1Name": "最高人民法院",
            "level1Id": 6
          },
          "lawId": "b2274825c8c3bc2343ca73680243ddc8",
          "lawItemId": "ccc209683be1509676174fd6890f24b8",
          "lawName": "最高人民法院关于常见犯罪的量刑指导意见",
          "lawOrder": "第二百六十三条",
          "lawTitle": "最高人民法院关于常见犯罪的量刑指导意见第二百六十三条",
          "modifyBasis": [],
          "potencyLevel": {
            "level2Name": "两高工作文件",
            "level1Name": "司法解释",
            "level2Id": "002004",
            "level1Id": "002004"
          },
          "releaseYearMonthDate": "2014年01月03日",
          "thematicClassify": null,
          "lawSourceContent": "第二百六十三条……",
          "timeliness": "已废止/失效"
        },
        "similarity": 0.005
      }
    ],
    "pageSize": 0,
    "query": "抢劫",
    "queryKeywords": [
      [
        "抢劫"
      ]
    ],
    "sortKeyAndDirection": {
      "similarity": "desc",
      "releaseYearMonthDate": "desc"
    },
    "totalCount": 0
  },
  "httpStatusCode": 200,
  "success": true,
  "message": "系统错误(接口正常为空)",
  "code": "Ok"
}

Error codes

Visit the Error Center to view more error codes.