34 lines
622 B
TypeScript
34 lines
622 B
TypeScript
export type GoogleGenerativeAIPrompt = Array<GoogleGenerativeAIContent>;
|
|
|
|
export type GoogleGenerativeAIContent = {
|
|
role: 'user' | 'model';
|
|
parts: Array<GoogleGenerativeAIContentPart>;
|
|
};
|
|
|
|
export type GoogleGenerativeAIContentPart =
|
|
| { text: string }
|
|
| {
|
|
inlineData: {
|
|
mimeType: string;
|
|
data: string;
|
|
};
|
|
}
|
|
| {
|
|
functionCall: {
|
|
name: string;
|
|
args: unknown;
|
|
};
|
|
}
|
|
| {
|
|
functionResponse: {
|
|
name: string;
|
|
response: unknown;
|
|
};
|
|
}
|
|
| {
|
|
fileData: {
|
|
mimeType: string;
|
|
fileUri: string;
|
|
};
|
|
};
|