lmnr-ai / lmnr

Laminar - open-source all-in-one platform for engineering AI products. Crate data flywheel for you AI app. Traces, Evals, Datasets, Labels. YC S24.
https://www.lmnr.ai
Apache License 2.0
1.19k stars 60 forks source link

Aisdk #104

Closed skull8888888 closed 1 month ago

skull8888888 commented 1 month ago

[!IMPORTANT] Update AI SDK auto-instrumentation handling in spans.rs and adjust frontend SpanView to reflect these changes, while removing specific AI SDK dependencies.

  • Behavior:
    • Update Span handling in spans.rs to support Vercel's AI SDK auto-instrumentation by checking ai.prompt.messages and ai.response.text attributes.
    • Modify output_from_completion_content() to handle gen_ai.completion.0.content and tool calls.
  • Frontend:
    • Update SpanView in span-view.tsx to calculate totalTokenCount using gen_ai.usage.input_tokens and gen_ai.usage.output_tokens.
  • Dependencies:
    • Remove @ai-sdk/amazon-bedrock, @ai-sdk/anthropic, @ai-sdk/openai, and ai from package.json.

This description was created by Ellipsis for cfbbf9049e210863b8bd20bf7ef1bcf8ca8d4e4e. It will automatically update as commits are pushed.