def _uninstrument()

in instrumentation/elastic-opentelemetry-instrumentation-openai/src/opentelemetry/instrumentation/openai/__init__.py [0:0]


    def _uninstrument(self, **kwargs):
        # unwrap only supports uninstrumenting real module references so we
        # import here.
        import openai

        unwrap(openai.resources.chat.completions.Completions, "create")
        unwrap(openai.resources.chat.completions.AsyncCompletions, "create")
        if self.beta_chat_available:
            unwrap(openai.resources.beta.chat.completions.Completions, "parse")
            unwrap(openai.resources.beta.chat.completions.AsyncCompletions, "parse")
        unwrap(openai.resources.embeddings.Embeddings, "create")
        unwrap(openai.resources.embeddings.AsyncEmbeddings, "create")