external knowledge api (#8913)
Co-authored-by: Yi <yxiaoisme@gmail.com>
This commit is contained in:
@@ -25,6 +25,7 @@ export type DataSet = {
|
||||
app_count: number
|
||||
document_count: number
|
||||
word_count: number
|
||||
provider: string
|
||||
embedding_model: string
|
||||
embedding_model_provider: string
|
||||
embedding_available: boolean
|
||||
@@ -32,6 +33,58 @@ export type DataSet = {
|
||||
retrieval_model: RetrievalConfig
|
||||
tags: Tag[]
|
||||
partial_member_list?: any[]
|
||||
external_knowledge_info: {
|
||||
external_knowledge_id: string
|
||||
external_knowledge_api_id: string
|
||||
external_knowledge_api_name: string
|
||||
external_knowledge_api_endpoint: string
|
||||
}
|
||||
external_retrieval_model: {
|
||||
top_k: number
|
||||
score_threshold: number
|
||||
score_threshold_enabled: boolean
|
||||
}
|
||||
}
|
||||
|
||||
export type ExternalAPIItem = {
|
||||
id: string
|
||||
tenant_id: string
|
||||
name: string
|
||||
description: string
|
||||
settings: {
|
||||
endpoint: string
|
||||
api_key: string
|
||||
}
|
||||
dataset_bindings: { id: string; name: string }[]
|
||||
created_by: string
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export type ExternalKnowledgeItem = {
|
||||
id: string
|
||||
name: string
|
||||
description: string | null
|
||||
provider: 'external'
|
||||
permission: DatasetPermission
|
||||
data_source_type: null
|
||||
indexing_technique: null
|
||||
app_count: number
|
||||
document_count: number
|
||||
word_count: number
|
||||
created_by: string
|
||||
created_at: string
|
||||
updated_by: string
|
||||
updated_at: string
|
||||
tags: Tag[]
|
||||
}
|
||||
|
||||
export type ExternalAPIDeleteResponse = {
|
||||
result: 'success' | 'error'
|
||||
}
|
||||
|
||||
export type ExternalAPIUsage = {
|
||||
is_using: boolean
|
||||
count: number
|
||||
}
|
||||
|
||||
export type CustomFile = File & {
|
||||
@@ -73,6 +126,14 @@ export type DataSetListResponse = {
|
||||
total: number
|
||||
}
|
||||
|
||||
export type ExternalAPIListResponse = {
|
||||
data: ExternalAPIItem[]
|
||||
has_more: boolean
|
||||
limit: number
|
||||
page: number
|
||||
total: number
|
||||
}
|
||||
|
||||
export type QA = {
|
||||
question: string
|
||||
answer: string
|
||||
@@ -385,6 +446,16 @@ export type HitTesting = {
|
||||
tsne_position: TsnePosition
|
||||
}
|
||||
|
||||
export type ExternalKnowledgeBaseHitTesting = {
|
||||
content: string
|
||||
title: string
|
||||
score: number
|
||||
metadata: {
|
||||
'x-amz-bedrock-kb-source-uri': string
|
||||
'x-amz-bedrock-kb-data-source-id': string
|
||||
}
|
||||
}
|
||||
|
||||
export type Segment = {
|
||||
id: string
|
||||
document: Document
|
||||
@@ -425,6 +496,13 @@ export type HitTestingResponse = {
|
||||
records: Array<HitTesting>
|
||||
}
|
||||
|
||||
export type ExternalKnowledgeBaseHitTestingResponse = {
|
||||
query: {
|
||||
content: string
|
||||
}
|
||||
records: Array<ExternalKnowledgeBaseHitTesting>
|
||||
}
|
||||
|
||||
export type RelatedApp = {
|
||||
id: string
|
||||
name: string
|
||||
@@ -462,6 +540,9 @@ export type SelectedDatasetsMode = {
|
||||
allHighQualityFullTextSearch: boolean
|
||||
allEconomic: boolean
|
||||
mixtureHighQualityAndEconomic: boolean
|
||||
allInternal: boolean
|
||||
allExternal: boolean
|
||||
mixtureInternalAndExternal: boolean
|
||||
inconsistentEmbeddingModel: boolean
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user