openai/openai-python

Public

mirrored fromhttps://github.com/openai/openai-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.109.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

tests/compat/test_tool_param.py

8lines · modepreview

from openai.types.chat import ChatCompletionToolParam


def test_tool_param_can_be_instantiated() -> None:
    assert ChatCompletionToolParam(type="function", function={"name": "test"}) == {
        "function": {"name": "test"},
        "type": "function",
    }