mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
typos
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from .function_calls import OpenAISchema, openai_function, openai_schema
|
||||
from .dsl import MultiTask, Maybe, Validator, llm_validator, CitationMixin
|
||||
from .dsl import MultiTask, Maybe, llm_validator, CitationMixin
|
||||
from .patch import patch
|
||||
|
||||
__all__ = [
|
||||
@@ -10,6 +10,5 @@ __all__ = [
|
||||
"Maybe",
|
||||
"openai_schema",
|
||||
"patch",
|
||||
"Validator",
|
||||
"llm_validator",
|
||||
]
|
||||
|
||||
@@ -64,7 +64,6 @@ class CitationMixin(BaseModel):
|
||||
If the span is not found, remove the substring_phrase from the list.
|
||||
"""
|
||||
if info.context is None:
|
||||
logger.info("No context found, skipping validation")
|
||||
return self
|
||||
|
||||
# Get the context from the info
|
||||
|
||||
@@ -118,7 +118,7 @@ def MultiTask(
|
||||
new_cls = create_model(
|
||||
name,
|
||||
tasks=list_tasks,
|
||||
__base__=(OpenAISchema, MultiTaskBase),
|
||||
__base__=(OpenAISchema, MultiTaskBase), # type: ignore
|
||||
)
|
||||
# set the class constructor BaseModel
|
||||
new_cls.task_type = subtask_class
|
||||
|
||||
+2
-2
@@ -103,13 +103,13 @@ def wrap_chatcompletion(func: Callable) -> Callable:
|
||||
|
||||
@wraps(func)
|
||||
async def new_chatcompletion_async(
|
||||
response_model=None, valiation_context=None, *args, max_retries=0, **kwargs
|
||||
response_model=None, validation_context=None, *args, max_retries=0, **kwargs
|
||||
):
|
||||
response_model, new_kwargs = handle_response_model(response_model, kwargs) # type: ignore
|
||||
response, error = await retry_async(
|
||||
func=func,
|
||||
response_model=response_model,
|
||||
valiation_context=valiation_context,
|
||||
validation_context=validation_context,
|
||||
max_retries=max_retries,
|
||||
args=args,
|
||||
kwargs=new_kwargs,
|
||||
|
||||
Reference in New Issue
Block a user