mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Shovel around more of AI code (no-changelog) (#12218)
This commit is contained in:
committed by
GitHub
parent
a8e7a05856
commit
2ce1644d01
@@ -13,15 +13,12 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { inputSchemaField, jsonSchemaExampleField, schemaTypeField } from '@utils/descriptions';
|
||||
import { convertJsonSchemaToZod, generateSchema } from '@utils/schemaParsing';
|
||||
import { getTracingConfig } from '@utils/tracing';
|
||||
|
||||
import { makeZodSchemaFromAttributes } from './helpers';
|
||||
import type { AttributeDefinition } from './types';
|
||||
import {
|
||||
inputSchemaField,
|
||||
jsonSchemaExampleField,
|
||||
schemaTypeField,
|
||||
} from '../../../utils/descriptions';
|
||||
import { convertJsonSchemaToZod, generateSchema } from '../../../utils/schemaParsing';
|
||||
import { getTracingConfig } from '../../../utils/tracing';
|
||||
|
||||
const SYSTEM_PROMPT_TEMPLATE = `You are an expert extraction algorithm.
|
||||
Only extract relevant information from the text.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import type { AttributeDefinition } from './types';
|
||||
|
||||
function makeAttributeSchema(attributeDefinition: AttributeDefinition, required: boolean = true) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow/src';
|
||||
import get from 'lodash/get';
|
||||
|
||||
import { FakeLLM, FakeListChatModel } from '@langchain/core/utils/testing';
|
||||
import type { BaseLanguageModel } from '@langchain/core/language_models/base';
|
||||
import { InformationExtractor } from '../InformationExtractor.node';
|
||||
import { FakeLLM, FakeListChatModel } from '@langchain/core/utils/testing';
|
||||
import get from 'lodash/get';
|
||||
import type { IDataObject, IExecuteFunctions } from 'n8n-workflow/src';
|
||||
|
||||
import { makeZodSchemaFromAttributes } from '../helpers';
|
||||
import { InformationExtractor } from '../InformationExtractor.node';
|
||||
import type { AttributeDefinition } from '../types';
|
||||
|
||||
const mockPersonAttributes: AttributeDefinition[] = [
|
||||
|
||||
Reference in New Issue
Block a user