@n8n/n8n-nodes-langchain
Version:

46 lines (41 loc) • 1.2 kB
text/typescript
/**
* OpenAI Node - Version 2
* Discriminator: resource=text, operation=classify
*/
interface Credentials {
openAiApi: CredentialReference;
}
/** Check whether content complies with usage policies */
export type LcOpenAiV2TextClassifyParams = {
resource: 'text';
operation: 'classify';
/**
* The input text to classify if it is violates the moderation policy
*/
input?: string | Expression<string> | PlaceholderValue;
/**
* Whether to return a simplified version of the response instead of the raw data
* @default false
*/
simplify?: boolean | Expression<boolean>;
/**
* Options
* @default {}
*/
options?: {
/** Whether to use the stable version of the model instead of the latest version, accuracy may be slightly lower
* @default false
*/
useStableModel?: boolean | Expression<boolean>;
};
};
export interface LcOpenAiV2TextClassifySubnodeConfig {
tools?: ToolInstance[];
memory?: MemoryInstance;
}
export type LcOpenAiV2TextClassifyNode = {
type: '@n8n/n8n-nodes-langchain.openAi';
version: 2;
credentials?: Credentials;
config: NodeConfig<LcOpenAiV2TextClassifyParams> & { subnodes?: LcOpenAiV2TextClassifySubnodeConfig };
};