Socket
Socket
Sign inDemoInstall

openai-responses

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

openai-responses

🧪🤖 Pytest plugin for automatically mocking OpenAI requests


Maintainers
1

🧪🤖 openai-responses

Pytest plugin for automatically mocking OpenAI requests. Powered by RESPX.

sdk support

Supported Endpoints

View full support coverage here.

[!TIP] ✨ Support for creating streaming responses added in v0.4

Usage

Just decorate any test function that makes a call to the OpenAI API (either using openai-python or with HTTPX).

import openai

import openai_responses


@openai_responses.mock()
def test_create_assistant():
    client = openai.Client(api_key="sk-fake123")

    assistant = client.beta.assistants.create(
        instructions="You are a personal math tutor.",
        name="Math Tutor",
        tools=[{"type": "code_interpreter"}],
        model="gpt-4-turbo",
    )

    assert assistant.name == "Math Tutor"

See examples or docs for more.

Installation

PyPI version PyPI - Python Version PyPI - Downloads

Available on PyPI

pip install openai-responses

Documentation

Docs

See the documentation site for more info.

License

PyPI - License

See LICENSE for more info.

Contributing

Open Issues Stargazers

See CONTRIBUTING.md for info on PRs, issues, and feature requests.

Changelog

See CHANGELOG.md for summarized notes on changes or view releases for more details information on changes.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc