@n8n/n8n-nodes-langchain
Version:

54 lines (49 loc) • 1.62 kB
text/typescript
/**
* OpenAI Node - Version 2.1
* Discriminator: resource=conversation, operation=create
*/
interface Credentials {
openAiApi: CredentialReference;
}
/** Create a conversation */
export type LcOpenAiV21ConversationCreateParams = {
resource: 'conversation';
operation: 'create';
/**
* Messages
* @default {"values":[{"type":"text"}]}
*/
messages?: {
/** Message
*/
values?: Array<{
/** Role in shaping the model's response, it tells the model how it should behave and interact with the user
* @default user
*/
role?: 'user' | 'assistant' | 'system' | Expression<string>;
/** The content of the message to be send
*/
content?: string | Expression<string> | PlaceholderValue;
}>;
};
/**
* Options
* @default {}
*/
options?: {
/** Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
* @default {}
*/
metadata?: IDataObject | string | Expression<string>;
};
};
export interface LcOpenAiV21ConversationCreateSubnodeConfig {
tools?: ToolInstance[];
memory?: MemoryInstance;
}
export type LcOpenAiV21ConversationCreateNode = {
type: '@n8n/n8n-nodes-langchain.openAi';
version: 2.1;
credentials?: Credentials;
config: NodeConfig<LcOpenAiV21ConversationCreateParams> & { subnodes?: LcOpenAiV21ConversationCreateSubnodeConfig };
};