25 lines
1.4 KiB
TypeScript
25 lines
1.4 KiB
TypeScript
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
import type { BatchConfig } from "./BatchConfig";
|
|
|
|
/**
|
|
* Implements a subset of the GCP Vertex Gemini API as documented [here](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.publishers.models/generateContent) for non-streaming
|
|
* and [here](https://cloud.google.com/vertex-ai/docs/reference/rest/v1/projects.locations.publishers.models/streamGenerateContent) for streaming
|
|
*
|
|
* Our current behavior around content blocks is:
|
|
* * In both streaming and non-streaming, we handle 'thought: true' parts with no extra content, or with text content. These become normal 'Thought' blocks (with a signature)
|
|
* * In non-streaming mode, 'thought: true' parts with non-text content (e.g. an image) are treated as 'unknown' blocks.
|
|
* * In streaming mode, 'thought: true' parts with non-text content produce an error (since we don't have "unknown" blocks in streaming mode)
|
|
*
|
|
* In the future, we'll support 'unknown' blocks in streaming mode, and adjust this provider to emit them.
|
|
*/
|
|
export type GCPVertexGeminiProvider = {
|
|
api_v1_base_url: string;
|
|
request_url: string;
|
|
streaming_request_url: string;
|
|
audience: string;
|
|
model_id: string | null;
|
|
endpoint_id: string | null;
|
|
model_or_endpoint_id: string;
|
|
batch_config: BatchConfig | null;
|
|
};
|