Skip to content

Commit 3481730

Browse files
Copilotfpfp100
andauthored
Remove TextCompletion and GenerateContent from InferenceOperationType and GEN_AI_OPERATION_NAMES
Agent-Logs-Url: https://github.com/microsoft/Agent365-nodejs/sessions/3acaba0f-3822-468d-b962-cf8531c7be53 Co-authored-by: fpfp100 <126631706+fpfp100@users.noreply.github.com>
1 parent 576da62 commit 3481730

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

packages/agents-a365-observability/docs/design.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -451,9 +451,7 @@ enum InvocationRole {
451451
}
452452

453453
enum InferenceOperationType {
454-
CHAT = 'Chat',
455-
TEXT_COMPLETION = 'TextCompletion',
456-
GENERATE_CONTENT = 'GenerateContent'
454+
CHAT = 'Chat'
457455
}
458456
```
459457

packages/agents-a365-observability/src/tracing/contracts.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ export enum InvocationRole {
2626
* Represents different operation for types for model inference
2727
*/
2828
export enum InferenceOperationType {
29-
CHAT = 'Chat',
30-
TEXT_COMPLETION = 'TextCompletion',
31-
GENERATE_CONTENT = 'GenerateContent'
29+
CHAT = 'Chat'
3230
}
3331

3432
/**

packages/agents-a365-observability/src/tracing/exporter/utils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ const GEN_AI_OPERATION_NAMES: ReadonlySet<string> = new Set([
9797
OpenTelemetryConstants.OUTPUT_MESSAGES_OPERATION_NAME, // 'output_messages'
9898
OpenTelemetryConstants.CHAT_OPERATION_NAME, // 'chat'
9999
'Chat', // InferenceOperationType.CHAT
100-
'TextCompletion', // InferenceOperationType.TEXT_COMPLETION
101-
'GenerateContent', // InferenceOperationType.GENERATE_CONTENT
102100
]);
103101

104102
/**

tests/observability/core/scopes.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ describe('Scopes', () => {
558558
it('should create scope with minimal details', () => {
559559
const spy = jest.spyOn(OpenTelemetryScope.prototype as any, 'setTagMaybe');
560560
const inferenceDetails: InferenceDetails = {
561-
operationName: InferenceOperationType.TEXT_COMPLETION,
561+
operationName: InferenceOperationType.CHAT,
562562
model: 'gpt-3.5-turbo'
563563
};
564564

0 commit comments

Comments
 (0)