mirror of
https://github.com/langgenius/dify.git
synced 2026-09-24 23:22:26 +08:00
refactor(api): migrate console app chat endpoints to BaseModel (#37952)
Co-authored-by: Asuka Minato <i@asukaminato.eu.org> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Asuka Minato
autofix-ci[bot]
parent
61650d34ce
commit
5d0576de0a
@@ -2371,7 +2371,7 @@ Get status of annotation reply action job
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Job status retrieved successfully | **application/json**: [AnnotationJobStatusResponse](#annotationjobstatusresponse)<br> |
|
||||
| 200 | Job status retrieved successfully | **application/json**: [AnnotationJobStatusDetailResponse](#annotationjobstatusdetailresponse)<br> |
|
||||
| 403 | Insufficient permissions | |
|
||||
|
||||
### [GET] /apps/{app_id}/annotation-setting
|
||||
@@ -2480,7 +2480,7 @@ Batch import annotations from CSV file with rate limiting and security checks
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Batch import started successfully | **application/json**: [AnnotationJobStatusResponse](#annotationjobstatusresponse)<br> |
|
||||
| 200 | Batch import started successfully | **application/json**: [AnnotationBatchImportResponse](#annotationbatchimportresponse)<br> |
|
||||
| 400 | No file uploaded or too many files | |
|
||||
| 403 | Insufficient permissions | |
|
||||
| 413 | File too large | |
|
||||
@@ -2500,7 +2500,7 @@ Get status of batch import job
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Job status retrieved successfully | **application/json**: [AnnotationJobStatusResponse](#annotationjobstatusresponse)<br> |
|
||||
| 200 | Job status retrieved successfully | **application/json**: [AnnotationJobStatusDetailResponse](#annotationjobstatusdetailresponse)<br> |
|
||||
| 403 | Insufficient permissions | |
|
||||
|
||||
### [GET] /apps/{app_id}/annotations/count
|
||||
@@ -2816,11 +2816,11 @@ Generate completion message for debugging
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Completion generated successfully | **application/json**: [GeneratedAppResponse](#generatedappresponse)<br> |
|
||||
| 400 | Invalid request parameters | |
|
||||
| 404 | App not found | |
|
||||
| Code | Description |
|
||||
| ---- | ----------- |
|
||||
| 200 | Completion generated successfully |
|
||||
| 400 | Invalid request parameters |
|
||||
| 404 | App not found |
|
||||
|
||||
### [POST] /apps/{app_id}/completion-messages/{task_id}/stop
|
||||
Stop a running completion message generation
|
||||
@@ -3379,10 +3379,10 @@ Convert text to speech for chat messages
|
||||
|
||||
#### Responses
|
||||
|
||||
| Code | Description | Schema |
|
||||
| ---- | ----------- | ------ |
|
||||
| 200 | Text to speech conversion successful | **application/json**: [AudioBinaryResponse](#audiobinaryresponse)<br> |
|
||||
| 400 | Bad request - Invalid parameters | |
|
||||
| Code | Description |
|
||||
| ---- | ----------- |
|
||||
| 200 | Text to speech conversion successful |
|
||||
| 400 | Bad request - Invalid parameters |
|
||||
|
||||
### [GET] /apps/{app_id}/text-to-audio/voices
|
||||
Get available TTS voices for a specific language
|
||||
@@ -14644,19 +14644,21 @@ Soft lifecycle state for Agent records.
|
||||
| id | string | | Yes |
|
||||
| question | string | | No |
|
||||
|
||||
#### AnnotationBatchImportResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| error_msg | string | | No |
|
||||
| job_id | string | | No |
|
||||
| job_status | string | | No |
|
||||
| record_count | integer | | No |
|
||||
|
||||
#### AnnotationCountResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| count | integer | Number of annotations | Yes |
|
||||
|
||||
#### AnnotationEmbeddingModelResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| embedding_model_name | string | | No |
|
||||
| embedding_provider_name | string | | No |
|
||||
|
||||
#### AnnotationExportList
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
@@ -14698,14 +14700,20 @@ Soft lifecycle state for Agent records.
|
||||
| limit | integer, <br>**Default:** 20 | Page size | No |
|
||||
| page | integer, <br>**Default:** 1 | Page number | No |
|
||||
|
||||
#### AnnotationJobStatusResponse
|
||||
#### AnnotationJobStatusDetailResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| error_msg | string | | No |
|
||||
| job_id | string | | No |
|
||||
| job_status | string | | No |
|
||||
| record_count | integer | | No |
|
||||
| job_id | string | | Yes |
|
||||
| job_status | string<br>string | | Yes |
|
||||
|
||||
#### AnnotationJobStatusResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| job_id | string | | Yes |
|
||||
| job_status | string<br>string | | Yes |
|
||||
|
||||
#### AnnotationList
|
||||
|
||||
@@ -14739,11 +14747,18 @@ Soft lifecycle state for Agent records.
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| action | string, <br>**Available values:** "disable", "enable" | *Enum:* `"disable"`, `"enable"` | Yes |
|
||||
|
||||
#### AnnotationSettingEmbeddingModelResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| embedding_model_name | string | | No |
|
||||
| embedding_provider_name | string | | No |
|
||||
|
||||
#### AnnotationSettingResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| embedding_model | [AnnotationEmbeddingModelResponse](#annotationembeddingmodelresponse) | | No |
|
||||
| embedding_model | [AnnotationSettingEmbeddingModelResponse](#annotationsettingembeddingmodelresponse) | | No |
|
||||
| enabled | boolean | | Yes |
|
||||
| id | string | | No |
|
||||
| score_threshold | number | | No |
|
||||
@@ -15712,13 +15727,13 @@ Enum class for configurate method of provider model.
|
||||
| admin_feedback_stats | [FeedbackStat](#feedbackstat) | | No |
|
||||
| annotation | [ConversationAnnotation](#conversationannotation) | | No |
|
||||
| created_at | integer | | No |
|
||||
| first_message | [SimpleMessageDetail](#simplemessagedetail) | | No |
|
||||
| from_account_id | string | | No |
|
||||
| from_account_name | string | | No |
|
||||
| from_end_user_id | string | | No |
|
||||
| from_end_user_session_id | string | | No |
|
||||
| from_source | string | | Yes |
|
||||
| id | string | | Yes |
|
||||
| message | [SimpleMessageDetail](#simplemessagedetail) | | No |
|
||||
| model_config | [SimpleModelConfig](#simplemodelconfig) | | No |
|
||||
| read_at | integer | | No |
|
||||
| status | string | | Yes |
|
||||
@@ -15782,11 +15797,11 @@ Enum class for configurate method of provider model.
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| created_at | integer | | No |
|
||||
| first_message | [MessageDetail](#messagedetail) | | No |
|
||||
| from_account_id | string | | No |
|
||||
| from_end_user_id | string | | No |
|
||||
| from_source | string | | Yes |
|
||||
| id | string | | Yes |
|
||||
| message | [MessageDetail](#messagedetail) | | No |
|
||||
| model_config | [ModelConfig](#modelconfig) | | No |
|
||||
| status | string | | Yes |
|
||||
|
||||
@@ -15794,10 +15809,10 @@ Enum class for configurate method of provider model.
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| has_next | boolean | | Yes |
|
||||
| items | [ [Conversation](#conversation) ] | | Yes |
|
||||
| data | [ [Conversation](#conversation) ] | | Yes |
|
||||
| has_more | boolean | | Yes |
|
||||
| limit | integer | | Yes |
|
||||
| page | integer | | Yes |
|
||||
| per_page | integer | | Yes |
|
||||
| total | integer | | Yes |
|
||||
|
||||
#### ConversationRenamePayload
|
||||
@@ -15860,7 +15875,7 @@ Enum class for configurate method of provider model.
|
||||
| read_at | integer | | No |
|
||||
| status | string | | Yes |
|
||||
| status_count | [StatusCount](#statuscount) | | No |
|
||||
| summary_or_query | string | | Yes |
|
||||
| summary | string | | Yes |
|
||||
| updated_at | integer | | No |
|
||||
| user_feedback_stats | [FeedbackStat](#feedbackstat) | | No |
|
||||
|
||||
@@ -15868,10 +15883,10 @@ Enum class for configurate method of provider model.
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| has_next | boolean | | Yes |
|
||||
| items | [ [ConversationWithSummary](#conversationwithsummary) ] | | Yes |
|
||||
| data | [ [ConversationWithSummary](#conversationwithsummary) ] | | Yes |
|
||||
| has_more | boolean | | Yes |
|
||||
| limit | integer | | Yes |
|
||||
| page | integer | | Yes |
|
||||
| per_page | integer | | Yes |
|
||||
| total | integer | | Yes |
|
||||
|
||||
#### ConvertToWorkflowPayload
|
||||
@@ -16044,10 +16059,10 @@ Model class for provider custom model configuration.
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| currency | string | | Yes |
|
||||
| currency | string | | No |
|
||||
| date | string | | Yes |
|
||||
| token_count | integer | | Yes |
|
||||
| total_price | string<br>number | | Yes |
|
||||
| token_count | integer | | No |
|
||||
| total_price | string | | No |
|
||||
|
||||
#### DailyTokenCostStatisticResponse
|
||||
|
||||
@@ -18344,6 +18359,7 @@ Enum class for large language model mode.
|
||||
| agent_thoughts | [ [AgentThought](#agentthought) ] | | Yes |
|
||||
| annotation | [ConversationAnnotation](#conversationannotation) | | No |
|
||||
| annotation_hit_history | [ConversationAnnotationHitHistory](#conversationannotationhithistory) | | No |
|
||||
| answer | string | | Yes |
|
||||
| answer_tokens | integer | | Yes |
|
||||
| conversation_id | string | | Yes |
|
||||
| created_at | integer | | No |
|
||||
@@ -18356,12 +18372,11 @@ Enum class for large language model mode.
|
||||
| inputs | object | | Yes |
|
||||
| message | [JSONValue](#jsonvalue) | | Yes |
|
||||
| message_files | [ [MessageFile](#messagefile) ] | | Yes |
|
||||
| message_metadata_dict | [JSONValue](#jsonvalue) | | Yes |
|
||||
| message_tokens | integer | | Yes |
|
||||
| metadata | [JSONValue](#jsonvalue) | | Yes |
|
||||
| parent_message_id | string | | No |
|
||||
| provider_response_latency | number | | Yes |
|
||||
| query | string | | Yes |
|
||||
| re_sign_file_url_answer | string | | Yes |
|
||||
| status | string | | Yes |
|
||||
| workflow_run_id | string | | No |
|
||||
|
||||
@@ -18369,27 +18384,27 @@ Enum class for large language model mode.
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| agent_thoughts | [ [AgentThought](#agentthought) ] | | No |
|
||||
| agent_thoughts | [ [AgentThought](#agentthought) ] | | Yes |
|
||||
| annotation | [ConversationAnnotation](#conversationannotation) | | No |
|
||||
| annotation_hit_history | [ConversationAnnotationHitHistory](#conversationannotationhithistory) | | No |
|
||||
| answer | string | | Yes |
|
||||
| answer_tokens | integer | | No |
|
||||
| answer_tokens | integer | | Yes |
|
||||
| conversation_id | string | | Yes |
|
||||
| created_at | integer | | No |
|
||||
| error | string | | No |
|
||||
| extra_contents | [ [HumanInputContent](#humaninputcontent) ] | | No |
|
||||
| feedbacks | [ [Feedback](#feedback) ] | | No |
|
||||
| feedbacks | [ [Feedback](#feedback) ] | | Yes |
|
||||
| from_account_id | string | | No |
|
||||
| from_end_user_id | string | | No |
|
||||
| from_source | string | | Yes |
|
||||
| id | string | | Yes |
|
||||
| inputs | object | | Yes |
|
||||
| message | [JSONValue](#jsonvalue) | | No |
|
||||
| message_files | [ [MessageFile](#messagefile) ] | | No |
|
||||
| message_tokens | integer | | No |
|
||||
| metadata | [JSONValue](#jsonvalue) | | No |
|
||||
| message | [JSONValue](#jsonvalue) | | Yes |
|
||||
| message_files | [ [MessageFile](#messagefile) ] | | Yes |
|
||||
| message_tokens | integer | | Yes |
|
||||
| metadata | [JSONValue](#jsonvalue) | | Yes |
|
||||
| parent_message_id | string | | No |
|
||||
| provider_response_latency | number | | No |
|
||||
| provider_response_latency | number | | Yes |
|
||||
| query | string | | Yes |
|
||||
| status | string | | Yes |
|
||||
| workflow_run_id | string | | No |
|
||||
@@ -20612,7 +20627,7 @@ Whitelist scopes accepted by RBAC app and dataset access config APIs.
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| model_dict | [JSONValue](#jsonvalue) | | No |
|
||||
| model | [JSONValue](#jsonvalue) | | No |
|
||||
| pre_prompt | string | | No |
|
||||
|
||||
#### SimpleProviderEntityResponse
|
||||
@@ -21235,9 +21250,11 @@ Tag type
|
||||
|
||||
#### TextToSpeechVoiceListResponse
|
||||
|
||||
Available voices
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| TextToSpeechVoiceListResponse | array | | |
|
||||
| TextToSpeechVoiceListResponse | array | Available voices | |
|
||||
|
||||
#### TextToSpeechVoiceQuery
|
||||
|
||||
@@ -21245,6 +21262,13 @@ Tag type
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| language | string | Language code | Yes |
|
||||
|
||||
#### TextToSpeechVoiceResponse
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
| ---- | ---- | ----------- | -------- |
|
||||
| name | string | Voice display name | Yes |
|
||||
| value | string | Voice identifier | Yes |
|
||||
|
||||
#### TokensPerSecondStatisticItem
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|
||||
Reference in New Issue
Block a user