Hi all
We’re working on a LangSmith OTEL implementation in Golang are having trouble specifying multiple parts for a single message. For example:
inputsMessages := []responses.ResponseInputItemUnionParam{
{
OfInputMessage: &responses.ResponseInputItemMessageParam{
Role: string(responses.ResponseInputMessageItemRoleUser),
Content: responses.ResponseInputMessageContentListParam{
{
OfInputText: &responses.ResponseInputTextParam{
Text: "What is in this picture?",
},
},
{
OfInputImage: &responses.ResponseInputImageParam{
ImageURL: param.NewOpt("https://cdn.creatureandcoagency.com/uploads/2014/06/Bottlenose-Dolphin-Facts-2.jpg"),
},
},
},
},
},
}
I’ve tried passing the entire messages array as JSON to gen_ai.prompt and sending content like so:
providerInvokeSpan.SetAttributes(attribute.Key("gen_ai.prompt.0.content").String(`[{ "type": "text", "text": "What is in this picture?" }, { "type": "input_image", "image_url": "https://cdn.creatureandcoagency.com/uploads/2014/06/Bottlenose-Dolphin-Facts-2.jpg" }]`))
Is this something the LangSmith OTEL integration supports?
I’ve also checked the Run struct in the OTEL collector but Inputs / Outputs are still weakly typed unfortunately
https://github.com/langchain-ai/langsmith-collector-proxy/blob/352bc8645a0345908ab03f0180716ece9d065d1b/internal/model/run.go#L4