mirror of
https://github.com/langgenius/dify.git
synced 2026-07-21 10:38:32 +08:00
Co-authored-by: Asuka Minato <i@asukaminato.eu.org> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
import * as z from 'zod'
|
|
|
|
/**
|
|
* BedrockRetrievalSetting
|
|
*
|
|
* Retrieval settings for Amazon Bedrock knowledge base queries.
|
|
*/
|
|
export const zBedrockRetrievalSetting = z.object({
|
|
score_threshold: z.number().optional().default(0),
|
|
top_k: z.int().nullish(),
|
|
})
|
|
|
|
/**
|
|
* BedrockRetrievalPayload
|
|
*/
|
|
export const zBedrockRetrievalPayload = z.object({
|
|
knowledge_id: z.string(),
|
|
query: z.string(),
|
|
retrieval_setting: zBedrockRetrievalSetting,
|
|
})
|
|
|
|
/**
|
|
* BedrockRetrievalRecordResponse
|
|
*/
|
|
export const zBedrockRetrievalRecordResponse = z.object({
|
|
content: z.string().nullish(),
|
|
metadata: z.record(z.string(), z.unknown()).nullish(),
|
|
score: z.number(),
|
|
title: z.string().nullish(),
|
|
})
|
|
|
|
/**
|
|
* BedrockRetrievalResponse
|
|
*/
|
|
export const zBedrockRetrievalResponse = z.object({
|
|
records: z.array(zBedrockRetrievalRecordResponse),
|
|
})
|
|
|
|
export const zPostTestRetrievalBody = zBedrockRetrievalPayload
|
|
|
|
/**
|
|
* Bedrock retrieval test completed
|
|
*/
|
|
export const zPostTestRetrievalResponse = zBedrockRetrievalResponse
|