constructor(params = defaultParams) {
    params = Object.assign({}, defaultParams, params)
    super(params)
    const { agent, segment, transaction } = params

    this.appName = agent.config.applications()[0]
    this.span_id = segment?.id
    this.request_id = params.runId
    this.trace_id = transaction?.traceId
    this.langchainMeta = params.metadata
    this.metadata = agent
    this.tags = Array.isArray(params.tags) ? params.tags.join(',') : params.tags
    this.error = params.error ?? null

    if (params.virtual !== undefined) {
      if (params.virtual !== true && params.virtual !== false) {
        throw Error('params.virtual must be a primitive boolean')
      }
      this.virtual_llm = params.virtual
    }
  }
Baseline object representing an event in a LangChain conversation.