# Object of type 'OpenAI' is not JSON serializable

**URL:** <https://community.deeplearning.ai/t/object-of-type-openai-is-not-json-serializable/507438>\
**Category:** Building and Evaluating Advanced RAG Applications\
**Created:** [November 30, 2023, 11:19am UTC](https://community.deeplearning.ai/t/object-of-type-openai-is-not-json-serializable/507438 "2023-11-30T11:19:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucapu](https://avatars.discourse-cdn.com/v4/letter/l/22d042/32.png) [@lucapu](https://community.deeplearning.ai/u/lucapu)\
**Post date:** [November 30, 2023, 11:19am UTC](https://community.deeplearning.ai/t/object-of-type-openai-is-not-json-serializable/507438/1 "2023-11-30T11:19:04Z")

</div>

in L1 notebook, I keep going to have this error message in cells containing get\_prebuilt\_trulens\_recorder() assignment. To be more precise, it worked fine in a first run but not in the following executions of the same notebook (even if I shutdown and restart from scratch). The complete error msg refers to a pydantic schema not respected.

I have made some advancements regarding the error. In fact, it does not appear if I maintain the db reset instruction:` tru.reset_database()`, but by doing so I cannot obtain the same results as in the video (see at time 10:40 for reference) where the instructor can easily compare the results of two different apps named Direct Query Engine and Sentence Window Query Engine respectively).

---

<div class="post-metadata">

**Author:** ![vaga20](https://avatars.discourse-cdn.com/v4/letter/v/a9a28c/32.png) [@vaga20](https://community.deeplearning.ai/u/vaga20)\
**Post date:** [December 2, 2023, 6:21am UTC](https://community.deeplearning.ai/t/object-of-type-openai-is-not-json-serializable/507438/2 "2023-12-02T06:21:06Z")

</div>

I have the same issue. Not sure how to retain the historical id.

---

<div class="post-metadata">

**Author:** ![Mykie\_Li](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mykie\_Li](https://community.deeplearning.ai/u/Mykie_Li)\
**Post date:** [December 3, 2023, 11:53pm UTC](https://community.deeplearning.ai/t/object-of-type-openai-is-not-json-serializable/507438/3 "2023-12-03T23:53:07Z")

</div>

same here!

In l4 ipynb, I commented out codes for Layer Two, and RAG Triad dashboard of Layer Three works fine. So the observation is cannot generate two Apps in a same leaderboard. Please help out.
