@@ -21,7 +21,6 @@ import (
2121
2222const PromptsPath = "/v1/traceloop/prompts"
2323
24-
2524type Traceloop struct {
2625 config Config
2726 promptRegistry model.PromptRegistry
@@ -30,7 +29,6 @@ type Traceloop struct {
3029 http.Client
3130}
3231
33-
3432func NewClient (ctx context.Context , config Config ) (* Traceloop , error ) {
3533 instance := Traceloop {
3634 config : config ,
@@ -153,7 +151,7 @@ func (instance *Traceloop) NewAgent(ctx context.Context, name string, agentAttrs
153151 }
154152
155153 if agentAttrs .ABTest != nil {
156- for key , activeVarient := range agentAttrs .ABTest .VarientsKeys {
154+ for key , activeVarient := range agentAttrs .ABTest .VarientKeys {
157155 if activeVarient {
158156 agentAttrs .AssociationProperties ["ab_testing_variant" ] = key
159157 break
@@ -169,9 +167,9 @@ func (instance *Traceloop) NewAgent(ctx context.Context, name string, agentAttrs
169167 span .SetAttributes (attrs ... )
170168
171169 return & Agent {
172- sdk : instance ,
173- workflow : nil ,
174- ctx : aCtx ,
170+ sdk : instance ,
171+ workflow : nil ,
172+ ctx : aCtx ,
175173 Attributes : agentAttrs ,
176174 }
177175}
@@ -199,7 +197,6 @@ func (instance *Traceloop) LogPrompt(ctx context.Context, prompt Prompt, context
199197 for key , value := range contextAttrs .AssociationProperties {
200198 attrs = append (attrs , attribute .String ("traceloop.association.properties." + key , value ))
201199 }
202-
203200
204201 span .SetAttributes (attrs ... )
205202 setMessagesAttribute (span , "llm.prompts" , prompt .Messages )
0 commit comments