Arize-ai / openinference

Auto-Instrumentation for AI Observability
https://arize-ai.github.io/openinference/
Apache License 2.0
146 stars 22 forks source link

fix(js): fallback patching flag for openAI for immutable modules #491

Closed mikeldking closed 1 month ago

mikeldking commented 1 month ago

In some runtimes the module exported is made immutable by the bundler (webpack) or the runtime (deno). This adds a fallback to a closure variable. The old flag is preserved just so that we can still check if a module is patched directly