Skip to content

Commit

Permalink
warn
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnl committed Dec 6, 2023
1 parent a01ef1b commit df8042e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions instructor/patch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import inspect
import json
import warnings
import logging
from collections.abc import Iterable
from functools import wraps
from json import JSONDecodeError
Expand All @@ -18,7 +18,7 @@

from .function_calls import Mode, OpenAISchema, openai_schema

logger = warnings.getLogger("instructor")
logger = logging.getLogger("instructor")

OVERRIDE_DOCS = """
Creates a new chat completion for the provided messages and parameters.
Expand Down Expand Up @@ -279,7 +279,7 @@ async def new_chatcompletion_async(
):
if mode == Mode.TOOLS:
max_retries = 0
warnings.warn("max_retries is not supported when using tool calls")
logger.warning("max_retries is not supported when using tool calls")

response_model, new_kwargs = handle_response_model(
response_model=response_model, kwargs=kwargs, mode=mode
Expand All @@ -305,7 +305,7 @@ def new_chatcompletion_sync(
):
if mode == Mode.TOOLS:
max_retries = 0
warnings.warn("max_retries is not supported when using tool calls")
logger.warning("max_retries is not supported when using tool calls")

response_model, new_kwargs = handle_response_model(
response_model=response_model, kwargs=kwargs, mode=mode
Expand Down

0 comments on commit df8042e

Please sign in to comment.