LangWatch OpenAI TypeScript integration guide
LANGWATCH_API_KEY
from the LangWatch dashboard.LANGWATCH_API_KEY
is set:
thread_id
in their metadata, making the individual messages become part of a conversation.
user_id
metadata to track user analytics.await trace.sendSpans();
to wait for all pending requests to be sent before the runtime is destroyed.source
as the documentId..addEvaluation
method:
name
is required and must be a string. The other fields are optional, but at least one of passed
, score
or label
must be provided.