( span: Span, request: typeof Generated.ChatGenerationParams.Encoded )
| 1036 | // ============================================================================= |
| 1037 | |
| 1038 | const annotateRequest = ( |
| 1039 | span: Span, |
| 1040 | request: typeof Generated.ChatGenerationParams.Encoded |
| 1041 | ): void => { |
| 1042 | addGenAIAnnotations(span, { |
| 1043 | system: "openrouter", |
| 1044 | operation: { name: "chat" }, |
| 1045 | request: { |
| 1046 | model: request.model, |
| 1047 | temperature: request.temperature, |
| 1048 | topP: request.top_p, |
| 1049 | maxTokens: request.max_tokens, |
| 1050 | stopSequences: Arr.ensure(request.stop).filter( |
| 1051 | Predicate.isNotNullable |
| 1052 | ) |
| 1053 | } |
| 1054 | }) |
| 1055 | } |
| 1056 | |
| 1057 | const annotateResponse = (span: Span, response: Generated.ChatResponse): void => { |
| 1058 | addGenAIAnnotations(span, { |
no outgoing calls
no test coverage detected