Skip to content

Commit

Permalink
Add the genkit client header to calls to Vertex Rapid Eval (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
schnecle authored May 2, 2024
1 parent 99cb078 commit 143b957
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/plugins/vertexai/src/evaluator_factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import { BaseDataPoint, defineEvaluator } from '@genkit-ai/ai/evaluator';
import { Action } from '@genkit-ai/core';
import { Action, GENKIT_CLIENT_HEADER } from '@genkit-ai/core';
import { runInNewSpan } from '@genkit-ai/core/tracing';
import { GoogleAuth } from 'google-auth-library';
import { JSONClient } from 'google-auth-library/build/src/auth/googleauth';
Expand Down Expand Up @@ -84,6 +84,9 @@ export class EvaluatorFactory {
url,
method: 'POST',
body: JSON.stringify(request),
headers: {
'X-Goog-Api-Client': GENKIT_CLIENT_HEADER,
},
});
metadata.output = response.data;

Expand Down

0 comments on commit 143b957

Please sign in to comment.