May the code of the "Trulens Quickstart" contain "no such attribute" error? #2345
-
|
The Quickstart example mentions in the "Build RAG from scratch" section:
The OpenAI class (type of oai_client) however does not have 'chat' attribute. I'm not sure, but shouldn't that line sound like tjis:
Was the example created with an older API version? How would it sound with the current version? |
Beta Was this translation helpful? Give feedback.
Answered by
sfc-gh-jreini
Feb 2, 2026
Replies: 1 comment 3 replies
-
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @viktorhollo - the change to the openai endpoint here has no impact on TruLens usage.
By using
@instrument(span_type=SpanAttributes.SpanType.GENERATION)decorator above a function, TruLens captures the input and output of that instrumented function (generate_completion) regardless of the underlying logic/apis used in the function.