Skip to content

Commit eb0a973

Browse files
committed
lint
1 parent aa91b3e commit eb0a973

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

traceloop-sdk/llm_span.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ func (llmSpan *LLMSpan) LogCompletion(ctx context.Context, completion Completion
3131
setMessagesAttribute(llmSpan.span, "llm.completions", completion.Messages)
3232

3333
defer llmSpan.span.End()
34-
}
34+
}

traceloop-sdk/model/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ const (
77
SpanKindAgent SpanKind = "agent"
88
SpanKindTask SpanKind = "task"
99
SpanKindWorkflow SpanKind = "workflow"
10-
)
10+
)

traceloop-sdk/sdk.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ import (
2121

2222
const PromptsPath = "/v1/traceloop/prompts"
2323

24-
const (
25-
ToolType = "tool"
26-
AgentType = "agent"
27-
)
2824

2925
type Traceloop struct {
3026
config Config
@@ -179,7 +175,7 @@ func (instance *Traceloop) LogToolCall(ctx context.Context, attrs ToolCallAttrib
179175

180176
spanAttrs := []attribute.KeyValue{
181177
semconvai.TraceloopWorkflowName.String(workflowAttrs.Name),
182-
semconvai.TraceloopSpanKind.String(ToolType),
178+
semconvai.TraceloopSpanKind.String(string(model.SpanKindTool)),
183179
semconvai.TraceloopEntityName.String(attrs.Name),
184180
}
185181

@@ -202,7 +198,7 @@ func (instance *Traceloop) LogAgent(ctx context.Context, attrs AgentAttributes,
202198

203199
spanAttrs := []attribute.KeyValue{
204200
semconvai.TraceloopWorkflowName.String(workflowAttrs.Name),
205-
semconvai.TraceloopSpanKind.String(AgentType),
201+
semconvai.TraceloopSpanKind.String(string(model.SpanKindAgent)),
206202
semconvai.LLMAgentName.String(attrs.Name),
207203
}
208204

traceloop-sdk/task.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@ func (task *Task) End() {
1919
func (task *Task) LogPrompt(prompt Prompt) LLMSpan {
2020
return task.workflow.sdk.LogPrompt(task.ctx, prompt, task.workflow.Attributes)
2121
}
22-
23-
func (task *Task) LogAgent(attrs AgentAttributes) LLMSpan {
24-
return task.workflow.sdk.LogAgent(task.ctx, attrs, task.workflow.Attributes)
25-
}
26-
27-
func (task *Task) LogToolCall(attrs ToolCallAttributes) LLMSpan {
28-
return task.workflow.sdk.LogToolCall(task.ctx, attrs, task.workflow.Attributes)
29-
}

0 commit comments

Comments
 (0)