feat: add gemini memory embeddings
This commit is contained in:
@@ -5,6 +5,7 @@ export function computeEmbeddingProviderKey(params: {
|
||||
providerId: string;
|
||||
providerModel: string;
|
||||
openAi?: { baseUrl: string; model: string; headers: Record<string, string> };
|
||||
gemini?: { baseUrl: string; model: string; headers: Record<string, string> };
|
||||
}): string {
|
||||
if (params.openAi) {
|
||||
const headerNames = fingerprintHeaderNames(params.openAi.headers);
|
||||
@@ -17,5 +18,16 @@ export function computeEmbeddingProviderKey(params: {
|
||||
}),
|
||||
);
|
||||
}
|
||||
if (params.gemini) {
|
||||
const headerNames = fingerprintHeaderNames(params.gemini.headers);
|
||||
return hashText(
|
||||
JSON.stringify({
|
||||
provider: "gemini",
|
||||
baseUrl: params.gemini.baseUrl,
|
||||
model: params.gemini.model,
|
||||
headerNames,
|
||||
}),
|
||||
);
|
||||
}
|
||||
return hashText(JSON.stringify({ provider: params.providerId, model: params.providerModel }));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user