refactor: trim embedding batch internal exports

This commit is contained in:
Peter Steinberger
2026-05-01 11:35:30 +01:00
parent 213bfcf79b
commit cc2564615b
3 changed files with 10 additions and 10 deletions

View File

@@ -19,12 +19,12 @@ type EmbeddingBatchExecutionParams = {
debug?: (message: string, data?: Record<string, unknown>) => void;
};
export type GeminiBatchRequest = {
type GeminiBatchRequest = {
custom_id: string;
request: GeminiTextEmbeddingRequest;
};
export type GeminiBatchStatus = {
type GeminiBatchStatus = {
name?: string;
state?: string;
outputConfig?: { file?: string; fileId?: string };
@@ -36,7 +36,7 @@ export type GeminiBatchStatus = {
error?: { message?: string };
};
export type GeminiBatchOutputLine = {
type GeminiBatchOutputLine = {
key?: string;
custom_id?: string;
request_id?: string;

View File

@@ -27,7 +27,7 @@ type EmbeddingBatchExecutionParams = {
debug?: (message: string, data?: Record<string, unknown>) => void;
};
export type OpenAiBatchRequest = {
type OpenAiBatchRequest = {
custom_id: string;
method: "POST";
url: "/v1/embeddings";
@@ -37,8 +37,8 @@ export type OpenAiBatchRequest = {
};
};
export type OpenAiBatchStatus = EmbeddingBatchStatus;
export type OpenAiBatchOutputLine = ProviderBatchOutputLine;
type OpenAiBatchStatus = EmbeddingBatchStatus;
type OpenAiBatchOutputLine = ProviderBatchOutputLine;
export const OPENAI_BATCH_ENDPOINT = EMBEDDING_BATCH_ENDPOINT;
const OPENAI_BATCH_COMPLETION_WINDOW = "24h";

View File

@@ -26,17 +26,17 @@ import type { VoyageEmbeddingClient } from "./embedding-provider.js";
* Voyage Batch API Input Line format.
* See: https://docs.voyageai.com/docs/batch-inference
*/
export type VoyageBatchRequest = {
type VoyageBatchRequest = {
custom_id: string;
body: {
input: string | string[];
};
};
export type VoyageBatchStatus = EmbeddingBatchStatus;
export type VoyageBatchOutputLine = ProviderBatchOutputLine;
type VoyageBatchStatus = EmbeddingBatchStatus;
type VoyageBatchOutputLine = ProviderBatchOutputLine;
export const VOYAGE_BATCH_ENDPOINT = EMBEDDING_BATCH_ENDPOINT;
const VOYAGE_BATCH_ENDPOINT = EMBEDDING_BATCH_ENDPOINT;
const VOYAGE_BATCH_COMPLETION_WINDOW = "12h";
const VOYAGE_BATCH_MAX_REQUESTS = 50000;