mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
59 lines
1007 B
TypeScript
59 lines
1007 B
TypeScript
import type { IDataObject } from 'n8n-workflow';
|
|
|
|
export type ChatCompletion = {
|
|
id: string;
|
|
object: string;
|
|
created: number;
|
|
model: string;
|
|
choices: Array<{
|
|
index: number;
|
|
message: {
|
|
role: string;
|
|
content: string;
|
|
tool_calls?: Array<{
|
|
id: string;
|
|
type: 'function';
|
|
function: {
|
|
name: string;
|
|
arguments: string;
|
|
};
|
|
}>;
|
|
};
|
|
finish_reason?: 'tool_calls';
|
|
}>;
|
|
usage: {
|
|
prompt_tokens: number;
|
|
completion_tokens: number;
|
|
total_tokens: number;
|
|
};
|
|
system_fingerprint: string;
|
|
};
|
|
|
|
export type ThreadMessage = {
|
|
id: string;
|
|
object: string;
|
|
created_at: number;
|
|
thread_id: string;
|
|
role: string;
|
|
content: Array<{
|
|
type: string;
|
|
text: {
|
|
value: string;
|
|
annotations: string[];
|
|
};
|
|
}>;
|
|
file_ids: string[];
|
|
assistant_id: string;
|
|
run_id: string;
|
|
metadata: IDataObject;
|
|
};
|
|
|
|
export type ExternalApiCallOptions = {
|
|
callExternalApi: boolean;
|
|
url: string;
|
|
path: string;
|
|
method: string;
|
|
requestOptions: IDataObject;
|
|
sendParametersIn: string;
|
|
};
|