MCPcopy Create free account
hub / github.com/Effect-TS/effect / annotateRequest

Function annotateRequest

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected