openai/openai-python

Public

mirrored from https://github.com/openai/openai-pythonAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.80.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

src/openai/_extras/_common.py

21lines · modecode

1from .._exceptions import OpenAIError
2
3INSTRUCTIONS = """
4
5OpenAI error:
6
7 missing `{library}`
8
9This feature requires additional dependencies:
10
11 $ pip install openai[{extra}]
12
13"""
14
15
16def format_instructions(*, library: str, extra: str) -> str:
17 return INSTRUCTIONS.format(library=library, extra=extra)
18
19
20class MissingDependencyError(OpenAIError):
21 pass
22