feat: file schem file replace

This commit is contained in:
Joel
2025-08-27 16:07:31 +08:00
parent 4cb286c765
commit bd294ffe0d
7 changed files with 33 additions and 27 deletions

View File

@ -50,18 +50,6 @@ export const CHUNK_TYPE_MAP = {
qa_chunks: 'QAStructureChunk',
}
// deprecated, use schemaType in llm/types.ts instead
export const getOutputVariableAlias = (variable: Record<string, any>) => {
if (variable?.general_chunks)
return CHUNK_TYPE_MAP.general_chunks
if (variable?.parent_child_chunks)
return CHUNK_TYPE_MAP.parent_child_chunks
if (variable?.qa_chunks)
return CHUNK_TYPE_MAP.qa_chunks
if (variable?.file_type)
return 'file'
}
export const wrapStructuredVarItem = (outputItem: any, matchedSchemaType: string): StructuredOutput => {
const dataType = Type.object
return {