langchain-ai / langchainjs

🦜🔗 Build context-aware reasoning applications 🦜🔗
https://js.langchain.com/docs/
MIT License
12.73k stars 2.19k forks source link

Interest in supporting DataDog LLMObs non-beta API endpoint? #6160

Open mejackreed opened 4 months ago

mejackreed commented 4 months ago

Checked other resources

Example Code

  const output = await myChain.invoke(
    {
      input: '',
    },
    {
      callbacks: [
        new DatadogLLMObsTracer({
          mlApp: 'HiThere',
          service: 'foo',
          env: 'prod',
        }),
      ],
    },
  );

Error Message and Stack Trace (if applicable)

No response

Description

Currently the langchain-community DataDog handler has some errors using the https://docs.datadoghq.com/llm_observability/api/?tab=model

Specifically, Langchain's MessageContent serialization is incompatible with the upstream Message content: string type.

Are you open to a friendly pull request to add this compatibility?

System Info

not needed, api incompatibility

kritgrover commented 1 month ago

Hey is this still an issue or did you find a workaround? I can look into it if it's still open :)