chore: automatic commit 2025-04-30 12:48
This commit is contained in:
21
venv/lib/python3.11/site-packages/openai/_extras/_common.py
Normal file
21
venv/lib/python3.11/site-packages/openai/_extras/_common.py
Normal file
@@ -0,0 +1,21 @@
|
||||
from .._exceptions import OpenAIError
|
||||
|
||||
INSTRUCTIONS = """
|
||||
|
||||
OpenAI error:
|
||||
|
||||
missing `{library}`
|
||||
|
||||
This feature requires additional dependencies:
|
||||
|
||||
$ pip install openai[{extra}]
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def format_instructions(*, library: str, extra: str) -> str:
|
||||
return INSTRUCTIONS.format(library=library, extra=extra)
|
||||
|
||||
|
||||
class MissingDependencyError(OpenAIError):
|
||||
pass
|
||||
Reference in New Issue
Block a user