Querying the Chat History List
Function
Query the historical issue list. The information includes the dialog ID, question, username, and dialog start time.
URI
GET /v1/{project_id}/applications/{application_id}/uni-search/chat-history
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Definition: Project ID. For details about how to obtain the project ID, see Obtaining a Project ID. Constraints: N/A Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
application_id |
Yes |
String |
Definition: Application ID. For details about how to obtain the application ID, see Obtaining an Application ID. Constraints: Character string Value range: The value can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
user_name |
No |
String |
Definition: Username. Constraints: N/A Value range: The value must be a string of 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default value: N/A |
repo_id |
No |
String |
Definition: Knowledge base ID. Constraints: N/A Value range: The value must be a string of 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default value: N/A |
chat_id |
No |
String |
Definition: Chat ID. Constraints: N/A Value range: The value must be a string of 1 to 64 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Default value: N/A |
tags |
No |
Array of strings |
Definition: Document tag. The intersection of the query is output. Constraints: N/A Value range: N/A Default value: N/A |
type |
No |
String |
Definition: Type. The value must be a valid value for AnswerFromType. Constraints: N/A Value range:
Default value: N/A |
page_num |
No |
Integer |
Definition: Page number of the current request, indicating the start page from data retrieval. The default value is 1, indicating to start from the first page. Constraints: N/A Value range: 1-65535 Default value: 1 |
page_size |
No |
Integer |
Definition: Number of records displayed on each page, indicating the number of records returned per request. The default value is 10, indicating that 10 records are displayed on each page. Constraints: N/A Value range: 1-65535 Default value: 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition: Token used for API authentication. For details about how to obtain the token, see Obtaining an IAM User Token. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total |
Integer |
Definition: Total number of session histories. Value range: N/A |
size |
Integer |
Definition: Number of records returned on the current page. Value range: N/A |
pages |
Integer |
Definition: Total number of pages. Value range: N/A |
current |
Integer |
Definition: Current page number. Value range: N/A |
optimize_count_sql |
Boolean |
Definition: This parameter is not used currently. Value range: N/A |
search_count |
Boolean |
Definition: This parameter is not used currently. Value range: N/A |
records |
Array of ChatHistoryRecordInfo objects |
Definition: Session history details. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
chat_id |
String |
Definition: Chat ID, which uniquely identifies a chat. Value range: N/A |
knowledge_repo_id |
String |
Definition: Knowledge base ID, which identifies the knowledge base referenced by the current chat. Value range: N/A |
chat_title |
String |
Definition: Query in the current chat. Value range: N/A |
user_name |
String |
Definition: Username. Value range: N/A |
create_date_time |
String |
Definition: Timestamp indicating when a chat occurred. Value range: N/A |
project_id |
String |
Definition: Project ID. It can contain 1 to 64 characters. Only digits, letters, hyphens (-), and underscores (_) are allowed. The value must start with a letter. Reserved field. You can contact the personnel responsible for enabling the service to obtain the value of this field. Value range: N/A |
is_del |
Integer |
Definition: Whether the current chat is deleted. Value range:
|
slave_repo_id |
String |
Definition: Secondary knowledge base ID, which identifies the knowledge base referenced by the current chat. Use a comma (,) to separate multiple IDs. Value range: N/A |
type |
String |
Definition: Type. Value range: N/A |
question_models |
Array of QuestionModel objects |
Definition: History. Value range: N/A |
actions |
Array of strings |
Definition: Permissions. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
question_id |
String |
Definition: Question ID. Value range: N/A |
chat_id |
String |
Definition: Session ID. Value range: N/A |
question |
String |
Definition: Question. Value range: N/A |
rewrited_question |
String |
Definition: Rewritten question. Value range: N/A |
answer |
String |
Definition: Answer. Value range: N/A |
pangu_answer |
String |
Definition: Pangu answer. Value range: N/A |
user_name |
String |
Definition: Username. Value range: N/A |
create_date_time |
String |
Definition: Chat occurrent time. Value range: N/A |
feedback_status |
Integer |
Definition: Whether there is any feedback Value range: N/A |
feedback_type |
String |
Definition: Feedback type. Value range: N/A |
pangu_question |
String |
Definition: Pangu question. Value range: N/A |
feedback_date_time |
String |
Definition: Feedback time. Value range: N/A |
feedback_detail |
String |
Definition: Feedback details. Value range: N/A |
context_relation |
String |
Definition: Associated context. Value range: N/A |
revised_answer |
String |
Definition: Optimization result. Value range: N/A |
revised_reason |
String |
Definition: Optimized question. Value range: N/A |
standard_answer |
String |
Definition: Standard answer. Value range: N/A |
project_id |
String |
Definition: Project ID. Value range: N/A |
search_plan |
String |
Definition: Search planning content. Value range: N/A |
web_reference |
String |
Definition: Web reference. Value range: N/A |
question_reference_models |
Array of QuestionReferenceModel objects |
Definition: Reference file and segment details of the current answer. Value range: N/A |
Parameter |
Type |
Description |
---|---|---|
id |
Integer |
Definition: Reference chunk ID. Value range: N/A |
file_id |
String |
Definition: File ID. Value range: N/A |
reference_id |
String |
Definition: Reference file ID. Value range: N/A |
question_id |
String |
Definition: Question ID. Value range: N/A |
doc_index |
String |
Definition: Reference document index. Value range: N/A |
doc_title |
String |
Definition: Reference document name. Value range: N/A |
subtitle |
String |
Definition: Subheading of the reference segment. Value range: N/A |
doc_content |
String |
Definition: Reference segment content. Value range: N/A |
score |
Float |
Definition: Relevance score between the reference segment and the question. Value range: N/A |
type |
String |
Definition: Type. Value range: N/A |
page_num |
Integer |
Definition: Page number. Value range: N/A |
component_num |
Integer |
Definition: Number of components. Value range: N/A |
extend |
String |
Definition: JSON data used for document highlighting and locating. Example: { "element_id": "abc123", "elements": [ "elem1", "elem2", "elem3" ], "pdf_coordinate": [ [ 202, 687 ], [ 1031, 687 ] ] } Constraints: This parameter is supported only in clusters 25.7.T1 or later. Value range: N/A |
Example Requests
Query the chat history.
/v1/b25446daeb1a41a7953c5deba2b2677a/applications/be9b19bf-4865-4fb8-b9f8-2fd1fea98d76/uni-search/chat-history?page_num=1&page_size=10
Example Responses
Status code: 200
The query is successful.
{ "records" : [ { "chat_id" : "e447ed24-b3e0-4184-96cc-e06a9dc6cf89", "knowledge_repo_id" : "176e63a2-73bd-415c-aab2-f688030855e3", "chat_title" : "Today's Weather", "create_date_time" : "1695196394925", "is_del" : 0 }, { "chat_id" : "2c57dd12-0384-46c8-8d13-ae78dc857d94", "knowledge_repo_id" : "176e63a2-73bd-415c-aab2-f688030855e3", "chat_title" : "Will AI Replace Humans?", "create_date_time" : "1695195832442", "is_del" : 0 }, { "chat_id" : "ff193ad6-c812-402c-8233-f7ab5f4b0b11", "knowledge_repo_id" : "176e63a2-73bd-415c-aab2-f688030855e3", "chat_title" : "Will AI Replace Humans?", "create_date_time" : "1695195733199", "is_del" : 0 }, { "chat_id" : "f557e561-cc8f-47b1-bbd7-9d6064293588", "knowledge_repo_id" : "176e63a2-73bd-415c-aab2-f688030855e3", "chat_title" : "Is the weather good today?", "create_date_time" : "1695195285924", "is_del" : 0 }, { "chat_id" : "a0330214-ea10-4aba-874a-06cefa4bc77a", "knowledge_repo_id" : "852947fe-6c60-4d91-af65-839a0292127e", "chat_title" : "What Is a Neural Network?", "create_date_time" : "1695193989920", "is_del" : 0 }, { "chat_id" : "fbc01f0d-a9c4-4d80-a8e4-7c2e191472e9", "knowledge_repo_id" : "fba6ea89-5d9a-4835-9a8d-3ecebfc023e9", "chat_title" : "How are you?", "create_date_time" : "1695193289515", "is_del" : 0 }, { "chat_id" : "475ad732-d682-4899-8263-6643e1f1d045", "knowledge_repo_id" : "d3e0e470-0032-4907-ba64-9aba4521ed0c", "chat_title" : "How are you?", "create_date_time" : "1695193277246", "is_del" : 0 }, { "chat_id" : "73e00b01-df45-4222-81f1-018726e66315", "knowledge_repo_id" : "fba6ea89-5d9a-4835-9a8d-3ecebfc023e9", "chat_title" : "Where is Hangzhou?", "create_date_time" : "1695192613055", "is_del" : 0 }, { "chat_id" : "f6bee59c-a8b9-41d7-bca3-06b4e28fd70b", "knowledge_repo_id" : "d3e0e470-0032-4907-ba64-9aba4521ed0c", "chat_title" : "Where is Hangzhou?", "create_date_time" : "1695192600724", "is_del" : 0 }, { "chat_id" : "8b8d345e-833c-4b71-9bdd-e4ba75a6457e", "knowledge_repo_id" : "dbac6a40-6142-4447-b7ad-6718c089faf4", "chat_title" : "something", "create_date_time" : "1695115924537", "is_del" : 0 } ], "total" : 222, "size" : 10, "current" : 1, "optimize_count_sql" : true, "search_count" : true, "pages" : 23 }
Status Codes
Status Code |
Description |
---|---|
200 |
The query is successful. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot