MCPcopy Index your code
hub / github.com/Effect-TS/effect / annotateRequest

Function annotateRequest

packages/ai/google/src/GoogleLanguageModel.ts:774–786  ·  view source on GitHub ↗
(span: Span, request: typeof Generated.GenerateContentRequest.Encoded)

Source from the content-addressed store, hash-verified

772// =============================================================================
773
774const annotateRequest = (span: Span, request: typeof Generated.GenerateContentRequest.Encoded): void => {
775 addGenAIAnnotations(span, {
776 system: "gcp.gemini",
777 operation: { name: "chat" },
778 request: {
779 model: request.model,
780 temperature: request.generationConfig?.temperature,
781 topP: request.generationConfig?.topP,
782 maxTokens: request.generationConfig?.maxOutputTokens,
783 stopSequences: request.generationConfig?.stopSequences ?? []
784 }
785 })
786}
787
788const annotateResponse = (span: Span, response: typeof Generated.GenerateContentResponse.Type): void => {
789 const finishReasons: Array<string> = []

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected