From 3ae2636e66f79388e7c54e6c27534b358c066304 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Sun, 27 Aug 2023 17:51:43 -0700 Subject: [PATCH 01/10] feat: add one line tracing for OAI --- parea/wrapper/openai.py | 60 +++++++++++++++++++++++++ parea/wrapper/wrapper.py | 94 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) create mode 100644 parea/wrapper/openai.py create mode 100644 parea/wrapper/wrapper.py diff --git a/parea/wrapper/openai.py b/parea/wrapper/openai.py new file mode 100644 index 00000000..2a8e5432 --- /dev/null +++ b/parea/wrapper/openai.py @@ -0,0 +1,60 @@ +import json +from typing import Any, Callable, Dict, Optional, Sequence + +import openai + +from .wrapper import Wrapper +from ..schemas.models import LLMInputs + + +class OpenAIWrapper: + original_methods = { + "ChatCompletion.create": openai.ChatCompletion.create, + "ChatCompletion.acreate": openai.ChatCompletion.acreate + } + + @staticmethod + def resolver(_args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[Any]) -> Dict: + llm_config = {key: value for key, value in kwargs.items() if key in []} # todo: parse kwargs properly according to LLMInputs & ModelParams + if response: + usage = response["usage"] + output = OpenAIWrapper._get_output(response) + else: + output = None + usage = {} + + return { + "provider": "openai", + "configuration": LLMInputs(**llm_config), + "input_tokens": usage.get('prompt_tokens', 0), + "output_tokens": usage.get('completion_tokens', 0), + "total_tokens": usage.get('total_tokens', 0), + "output": output, + } + + @staticmethod + def init(log: Callable): + Wrapper( + resolver=OpenAIWrapper.resolver, + log=log, + module=openai, + func_names=list(OpenAIWrapper.original_methods.keys()) + ) + + @staticmethod + def _get_output(result) -> str: + response_message = result.choices[0].message + if response_message.get("function_call", None): + completion = OpenAIWrapper._format_function_call(response_message) + else: + completion = response_message.content.strip() + return completion + + @staticmethod + def _format_function_call(response_message) -> str: + function_name = response_message["function_call"]["name"] + if isinstance(response_message["function_call"]["arguments"], openai.openai_object.OpenAIObject): + function_args = dict(response_message["function_call"]["arguments"]) + else: + function_args = json.loads(response_message["function_call"]["arguments"]) + return f'```{json.dumps({"name": function_name, "arguments": function_args}, indent=4)}```' diff --git a/parea/wrapper/wrapper.py b/parea/wrapper/wrapper.py new file mode 100644 index 00000000..965bc9c7 --- /dev/null +++ b/parea/wrapper/wrapper.py @@ -0,0 +1,94 @@ +import functools +import inspect +from typing import Any, Callable, List +import time + +from parea.schemas.models import TraceLog +from parea.utils.trace_utils import to_date_and_time_string + + +class Wrapper: + def __init__(self, module: Any, func_names: List[str], resolver: Callable, log: Callable) -> None: + self.resolver = resolver + self.log = log + self.set_funcs(module, func_names) + + def set_funcs(self, module: Any, func_names: List[str]): + for func_name in func_names: + func_name_parts = func_name.split('.') + original = functools.reduce(getattr, func_name_parts, module) + setattr( + self.get_func_module(module, func_name_parts), + func_name_parts[-1], + self._wrapped_func(original) + ) + + @staticmethod + def get_func_module(module: Any, func_name_parts: List[str]): + return module if len(func_name_parts) == 1 else functools.reduce(getattr, func_name_parts[:-1], module) + + def _wrapped_func(self, original_func: Callable) -> Callable: + unwrapped_func = self.get_unwrapped_func(original_func) + return self.get_wrapper(unwrapped_func, original_func) + + @staticmethod + def get_unwrapped_func(original_func: Callable) -> Callable: + while hasattr(original_func, '__wrapped__'): + original_func = original_func.__wrapped__ + return original_func + + def get_wrapper(self, unwrapped_func: Callable, original_func: Callable): + if inspect.iscoroutinefunction(unwrapped_func): + return self.async_wrapper(original_func) + else: + return self.sync_wrapper(original_func) + + def async_wrapper(self, orig_func: Callable) -> Callable: + async def wrapper(*args, **kwargs): + start_time = time.time() + response = None + error = None + try: + response = await orig_func(*args, **kwargs) + return response + except Exception as e: + error = e + raise + finally: + self.log_result(start_time, response, error, args, kwargs) + return wrapper + + def sync_wrapper(self, orig_func: Callable) -> Callable: + def wrapper(*args, **kwargs): + start_time = time.time() + response = None + error = None + try: + response = orig_func(*args, **kwargs) + return response + except Exception as e: + error = e + raise + finally: + self.log_result(start_time, response, error, args, kwargs) + return wrapper + + def log_result(self, start_time: float, response: Any, error: Any, args, kwargs): + end_time = time.time() + latency = end_time - start_time + + start_timestamp = to_date_and_time_string(start_time) + end_timestamp = to_date_and_time_string(end_time) + + log_data_dict = { + 'trace_id': '', + 'start_timestamp': start_timestamp, + 'end_timestamp': end_timestamp, + "error": str(error), + "status": "success" if not error else "error", + "latency": latency, + } + + log_data_dict_provider = self.resolver(args, kwargs, response) + self.log(TraceLog(**log_data_dict, **log_data_dict_provider)) + From 5725955905adf16dcb554397dbcc762d1dbcb6f8 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 10:56:45 -0700 Subject: [PATCH 02/10] feat: add one line tracing for OAI --- parea/__init__.py | 1 + parea/schemas/models.py | 2 +- parea/utils/trace_utils.py | 14 +++-- parea/wrapper/__init__.py | 17 ++++++ parea/wrapper/openai.py | 34 +++++++---- parea/wrapper/wrapper.py | 114 +++++++++++++++++++++++-------------- 6 files changed, 122 insertions(+), 60 deletions(-) create mode 100644 parea/wrapper/__init__.py diff --git a/parea/__init__.py b/parea/__init__.py index 72d4a2e2..88568c23 100644 --- a/parea/__init__.py +++ b/parea/__init__.py @@ -12,6 +12,7 @@ from importlib import metadata as importlib_metadata from parea.client import Parea +import parea.wrapper # noqa: F401 def get_version() -> str: diff --git a/parea/schemas/models.py b/parea/schemas/models.py index 93279780..ded3f502 100644 --- a/parea/schemas/models.py +++ b/parea/schemas/models.py @@ -21,7 +21,7 @@ class Message: @define class ModelParams: - temp: float = 0.5 + temp: float = 1.0 top_p: float = 1.0 frequency_penalty: float = 0.0 presence_penalty: float = 0.0 diff --git a/parea/utils/trace_utils.py b/parea/utils/trace_utils.py index ec6dfb60..c455df42 100644 --- a/parea/utils/trace_utils.py +++ b/parea/utils/trace_utils.py @@ -88,11 +88,7 @@ def init_trace(func_name, args, kwargs, func): def cleanup_trace(trace_id): end_time = time.time() trace_data.get()[trace_id].end_timestamp = to_date_and_time_string(end_time) - logging_thread = threading.Thread( - target=parea_logger.record_log, - kwargs={"data": trace_data.get()[trace_id]}, - ) - logging_thread.start() + default_logger(trace_id) trace_context.get().pop() def decorator(func): @@ -139,3 +135,11 @@ def wrapper(*args, **kwargs): return decorator(func) return decorator + + +def default_logger(trace_id: str): + logging_thread = threading.Thread( + target=parea_logger.record_log, + kwargs={"data": trace_data.get()[trace_id]}, + ) + logging_thread.start() diff --git a/parea/wrapper/__init__.py b/parea/wrapper/__init__.py new file mode 100644 index 00000000..eb6d319b --- /dev/null +++ b/parea/wrapper/__init__.py @@ -0,0 +1,17 @@ +from parea.utils.trace_utils import default_logger +from parea.wrapper.openai import OpenAIWrapper + +_initialized_parea_wrapper = False + + +def init(): + global _initialized_parea_wrapper + if _initialized_parea_wrapper: + return + + OpenAIWrapper.init(default_logger) + + _initialized_parea_wrapper = True + + +init() diff --git a/parea/wrapper/openai.py b/parea/wrapper/openai.py index 2a8e5432..635be338 100644 --- a/parea/wrapper/openai.py +++ b/parea/wrapper/openai.py @@ -4,7 +4,8 @@ import openai from .wrapper import Wrapper -from ..schemas.models import LLMInputs +from ..schemas.models import LLMInputs, ModelParams +from ..utils.trace_utils import trace_data class OpenAIWrapper: @@ -14,8 +15,7 @@ class OpenAIWrapper: } @staticmethod - def resolver(_args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[Any]) -> Dict: - llm_config = {key: value for key, value in kwargs.items() if key in []} # todo: parse kwargs properly according to LLMInputs & ModelParams + def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[Any]) -> Dict: if response: usage = response["usage"] output = OpenAIWrapper._get_output(response) @@ -23,14 +23,26 @@ def resolver(_args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[An output = None usage = {} - return { - "provider": "openai", - "configuration": LLMInputs(**llm_config), - "input_tokens": usage.get('prompt_tokens', 0), - "output_tokens": usage.get('completion_tokens', 0), - "total_tokens": usage.get('total_tokens', 0), - "output": output, - } + llm_inputs = LLMInputs( + model=kwargs.get('model', None), + provider='openai', + messages=kwargs.get('messages', None), + functions=kwargs.get('functions', None), + function_call=kwargs.get('function_call', None), + model_params=ModelParams( + temp=kwargs.get('temperature', 1.0), + max_length=kwargs.get('max_tokens', None), + top_p=kwargs.get('top_p', 1.0), + frequency_penalty=kwargs.get('frequency_penalty', 0.0), + presence_penalty=kwargs.get('presence_penalty', 0.0), + ) + ) + + trace_data.get()[trace_id].configuration = llm_inputs + trace_data.get()[trace_id].input_tokens = usage.get('prompt_tokens', 0) + trace_data.get()[trace_id].output_tokens = usage.get('completion_tokens', 0) + trace_data.get()[trace_id].total_tokens = usage.get('total_tokens', 0) + trace_data.get()[trace_id].output = output @staticmethod def init(log: Callable): diff --git a/parea/wrapper/wrapper.py b/parea/wrapper/wrapper.py index 965bc9c7..8ce1af4d 100644 --- a/parea/wrapper/wrapper.py +++ b/parea/wrapper/wrapper.py @@ -1,94 +1,122 @@ import functools import inspect -from typing import Any, Callable, List +from typing import Any, Callable, List, Tuple import time +from uuid import uuid4 from parea.schemas.models import TraceLog -from parea.utils.trace_utils import to_date_and_time_string +from parea.utils.trace_utils import to_date_and_time_string, trace_context, trace_data, default_logger class Wrapper: - def __init__(self, module: Any, func_names: List[str], resolver: Callable, log: Callable) -> None: + def __init__(self, module: Any, func_names: List[str], resolver: Callable, log: Callable = default_logger) -> None: self.resolver = resolver self.log = log - self.set_funcs(module, func_names) + self.wrap_functions(module, func_names) - def set_funcs(self, module: Any, func_names: List[str]): + def wrap_functions(self, module: Any, func_names: List[str]): for func_name in func_names: func_name_parts = func_name.split('.') original = functools.reduce(getattr, func_name_parts, module) setattr( - self.get_func_module(module, func_name_parts), + module if len(func_name_parts) == 1 else functools.reduce(getattr, func_name_parts[:-1], module), func_name_parts[-1], self._wrapped_func(original) ) - @staticmethod - def get_func_module(module: Any, func_name_parts: List[str]): - return module if len(func_name_parts) == 1 else functools.reduce(getattr, func_name_parts[:-1], module) - def _wrapped_func(self, original_func: Callable) -> Callable: - unwrapped_func = self.get_unwrapped_func(original_func) - return self.get_wrapper(unwrapped_func, original_func) - - @staticmethod - def get_unwrapped_func(original_func: Callable) -> Callable: + unwrapped_func = original_func while hasattr(original_func, '__wrapped__'): - original_func = original_func.__wrapped__ - return original_func + unwrapped_func = original_func.__wrapped__ + return self._get_decorator(unwrapped_func, original_func) - def get_wrapper(self, unwrapped_func: Callable, original_func: Callable): + def _get_decorator(self, unwrapped_func: Callable, original_func: Callable): if inspect.iscoroutinefunction(unwrapped_func): - return self.async_wrapper(original_func) + return self.async_decorator(original_func) else: - return self.sync_wrapper(original_func) + return self.sync_decorator(original_func) + + def _init_trace(self) -> Tuple[str, float]: + start_time = time.time() + trace_id = str(uuid4()) + trace_context.get().append(trace_id) + + trace_data.get()[trace_id] = TraceLog( + trace_id=trace_id, + start_timestamp=to_date_and_time_string(start_time), + trace_name='LLM', + end_user_identifier=None, + metadata=None, + target=None, + tags=None, + inputs={}, + ) - def async_wrapper(self, orig_func: Callable) -> Callable: + parent_trace_id = trace_context.get()[-2] if len(trace_context.get()) > 1 else None + if not parent_trace_id: + # we don't have a parent trace id, so we need to create one + parent_trace_id = str(uuid4()) + trace_context.get().insert(0, parent_trace_id) + trace_data.get()[parent_trace_id] = TraceLog( + trace_id=parent_trace_id, + start_timestamp=to_date_and_time_string(start_time), + end_user_identifier=None, + metadata=None, + target=None, + tags=None, + inputs={}, + ) + trace_data.get()[parent_trace_id].children.append(trace_id) + self.log(parent_trace_id) + + return trace_id, start_time + + def async_decorator(self, orig_func: Callable) -> Callable: async def wrapper(*args, **kwargs): - start_time = time.time() + trace_id, start_time = self._init_trace() response = None - error = None try: response = await orig_func(*args, **kwargs) return response except Exception as e: - error = e + self._handle_error(trace_id, e) raise finally: - self.log_result(start_time, response, error, args, kwargs) + self._cleanup_trace(trace_id, start_time, response, args, kwargs) return wrapper - def sync_wrapper(self, orig_func: Callable) -> Callable: + def sync_decorator(self, orig_func: Callable) -> Callable: def wrapper(*args, **kwargs): - start_time = time.time() + trace_id, start_time = self._init_trace() response = None error = None try: response = orig_func(*args, **kwargs) return response except Exception as e: - error = e + error = str(e) raise finally: - self.log_result(start_time, response, error, args, kwargs) + self._cleanup_trace(trace_id, start_time, error, response, args, kwargs) return wrapper - def log_result(self, start_time: float, response: Any, error: Any, args, kwargs): + def _cleanup_trace(self, trace_id: str, start_time: float, error: str, response: Any, args, kwargs): end_time = time.time() - latency = end_time - start_time + trace_data.get()[trace_id].end_timestamp = to_date_and_time_string(end_time) + trace_data.get()[trace_id].latency = end_time - start_time - start_timestamp = to_date_and_time_string(start_time) - end_timestamp = to_date_and_time_string(end_time) + if error: + trace_data.get()[trace_id].error = error + trace_data.get()[trace_id].status = "error" + else: + trace_data.get()[trace_id].status = "success" - log_data_dict = { - 'trace_id': '', - 'start_timestamp': start_timestamp, - 'end_timestamp': end_timestamp, - "error": str(error), - "status": "success" if not error else "error", - "latency": latency, - } + self.resolver(trace_id, args, kwargs, response) - log_data_dict_provider = self.resolver(args, kwargs, response) - self.log(TraceLog(**log_data_dict, **log_data_dict_provider)) + self.log(trace_id) + trace_context.get().pop() + @staticmethod + def _handle_error(trace_id: str, e: Exception): + trace_data.get()[trace_id].error = str(e) + trace_data.get()[trace_id].status = "error" From 549ceb42febddda9324dc7c7b47bc7019b7e4c36 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 15:05:28 -0700 Subject: [PATCH 03/10] docs: add example --- .../tracing_with_open_ai_endpoint_directly.py | 92 ++++++++++++++++++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/parea/cookbook/tracing_with_open_ai_endpoint_directly.py b/parea/cookbook/tracing_with_open_ai_endpoint_directly.py index 9cf0de19..3fedebd3 100644 --- a/parea/cookbook/tracing_with_open_ai_endpoint_directly.py +++ b/parea/cookbook/tracing_with_open_ai_endpoint_directly.py @@ -1 +1,91 @@ -# TBU +import os +from datetime import datetime + +from dotenv import load_dotenv +import openai +from parea import Parea + + +load_dotenv() + +openai.api_key = os.getenv("OPENAI_API_KEY") + +p = Parea(api_key=os.getenv("PAREA_API_KEY")) + + +def argument_generator(query: str, additional_description: str = "", date=datetime.now()) -> str: + return openai.ChatCompletion.create( + model='gpt-3.5-turbo-0613', + messages=[ + { + 'role': 'system', + 'content': f'''You are a debater making an argument on a topic. +{additional_description}. +The current time is {date}''' + }, + {'role': 'user', 'content': f'''The discussion topic is {query}'''}, + ], + temperature=0.0 + ).choices[0].message['content'] + + +def critic(argument: str) -> str: + return openai.ChatCompletion.create( + model='gpt-3.5-turbo-0613', + messages=[ + {'role': 'system', 'content': f'''You are a critic. +What unresolved questions or criticism do you have after reading the following argument? +Provide a concise summary of your feedback.''' + }, + {'role': 'user', 'content': f'''{argument}'''}, + ], + temperature=0.0 + ).choices[0].message['content'] + + +def refiner(query: str, additional_description: str, current_arg: str, criticism: str, date=datetime.now()) -> str: + return openai.ChatCompletion.create( + model='gpt-3.5-turbo-0613', + messages=[ + {'role': 'system', 'content': f'''You are a debater making an argument on a topic. +{additional_description}. +The current time is {date}''' + }, + {'role': 'user', 'content': f'''The discussion topic is {query}'''}, + {'role': 'assistant', 'content': f'''{current_arg}'''}, + {'role': 'user', 'content': f'''{criticism}'''}, + { + 'role': 'system', + 'content': f'''Please generate a new argument that incorporates the feedback from the user.''' + } + ], + temperature=0.0 + ).choices[0].message['content'] + + +def argument_chain(query: str, additional_description: str = "") -> str: + argument = argument_generator(query, additional_description) + criticism = critic(argument) + return refiner(query, additional_description, argument, criticism) + + +if __name__ == "__main__": + result = argument_chain( + "Whether caffeine is good for you.", + additional_description="Provide a concise, few sentence argument on why caffeine is good for you.", + ) + print(result) + + from parea.schemas.models import FeedbackRequest + from parea.utils.trace_utils import get_current_trace_id + + p = Parea(api_key=os.getenv("PAREA_API_KEY")) + + trace_id = get_current_trace_id() + print(f'trace_id: {trace_id}') + p.record_feedback( + FeedbackRequest( + trace_id=trace_id, + score=0.7, # 0.0 (bad) to 1.0 (good) + ) + ) From 23886715e626e0b2c5b9541c8a39858b122f5a9a Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 15:14:11 -0700 Subject: [PATCH 04/10] style: fix style --- parea/__init__.py | 2 +- .../tracing_with_open_ai_endpoint_directly.py | 95 +++++++++++-------- parea/wrapper/openai.py | 45 ++++----- parea/wrapper/wrapper.py | 19 ++-- 4 files changed, 83 insertions(+), 78 deletions(-) diff --git a/parea/__init__.py b/parea/__init__.py index 88568c23..32997f23 100644 --- a/parea/__init__.py +++ b/parea/__init__.py @@ -11,8 +11,8 @@ from importlib import metadata as importlib_metadata -from parea.client import Parea import parea.wrapper # noqa: F401 +from parea.client import Parea def get_version() -> str: diff --git a/parea/cookbook/tracing_with_open_ai_endpoint_directly.py b/parea/cookbook/tracing_with_open_ai_endpoint_directly.py index 3fedebd3..83811d20 100644 --- a/parea/cookbook/tracing_with_open_ai_endpoint_directly.py +++ b/parea/cookbook/tracing_with_open_ai_endpoint_directly.py @@ -1,10 +1,10 @@ import os from datetime import datetime -from dotenv import load_dotenv import openai -from parea import Parea +from dotenv import load_dotenv +from parea import Parea load_dotenv() @@ -14,53 +14,66 @@ def argument_generator(query: str, additional_description: str = "", date=datetime.now()) -> str: - return openai.ChatCompletion.create( - model='gpt-3.5-turbo-0613', - messages=[ - { - 'role': 'system', - 'content': f'''You are a debater making an argument on a topic. + return ( + openai.ChatCompletion.create( + model="gpt-3.5-turbo-0613", + messages=[ + { + "role": "system", + "content": f"""You are a debater making an argument on a topic. {additional_description}. -The current time is {date}''' - }, - {'role': 'user', 'content': f'''The discussion topic is {query}'''}, - ], - temperature=0.0 - ).choices[0].message['content'] +The current time is {date}""", + }, + {"role": "user", "content": f"""The discussion topic is {query}"""}, + ], + temperature=0.0, + ) + .choices[0] + .message["content"] + ) def critic(argument: str) -> str: - return openai.ChatCompletion.create( - model='gpt-3.5-turbo-0613', - messages=[ - {'role': 'system', 'content': f'''You are a critic. + return ( + openai.ChatCompletion.create( + model="gpt-3.5-turbo-0613", + messages=[ + { + "role": "system", + "content": f"""You are a critic. What unresolved questions or criticism do you have after reading the following argument? -Provide a concise summary of your feedback.''' - }, - {'role': 'user', 'content': f'''{argument}'''}, - ], - temperature=0.0 - ).choices[0].message['content'] +Provide a concise summary of your feedback.""", + }, + {"role": "user", "content": f"""{argument}"""}, + ], + temperature=0.0, + ) + .choices[0] + .message["content"] + ) def refiner(query: str, additional_description: str, current_arg: str, criticism: str, date=datetime.now()) -> str: - return openai.ChatCompletion.create( - model='gpt-3.5-turbo-0613', - messages=[ - {'role': 'system', 'content': f'''You are a debater making an argument on a topic. + return ( + openai.ChatCompletion.create( + model="gpt-3.5-turbo-0613", + messages=[ + { + "role": "system", + "content": f"""You are a debater making an argument on a topic. {additional_description}. -The current time is {date}''' - }, - {'role': 'user', 'content': f'''The discussion topic is {query}'''}, - {'role': 'assistant', 'content': f'''{current_arg}'''}, - {'role': 'user', 'content': f'''{criticism}'''}, - { - 'role': 'system', - 'content': f'''Please generate a new argument that incorporates the feedback from the user.''' - } - ], - temperature=0.0 - ).choices[0].message['content'] +The current time is {date}""", + }, + {"role": "user", "content": f"""The discussion topic is {query}"""}, + {"role": "assistant", "content": f"""{current_arg}"""}, + {"role": "user", "content": f"""{criticism}"""}, + {"role": "system", "content": f"""Please generate a new argument that incorporates the feedback from the user."""}, + ], + temperature=0.0, + ) + .choices[0] + .message["content"] + ) def argument_chain(query: str, additional_description: str = "") -> str: @@ -82,7 +95,7 @@ def argument_chain(query: str, additional_description: str = "") -> str: p = Parea(api_key=os.getenv("PAREA_API_KEY")) trace_id = get_current_trace_id() - print(f'trace_id: {trace_id}') + print(f"trace_id: {trace_id}") p.record_feedback( FeedbackRequest( trace_id=trace_id, diff --git a/parea/wrapper/openai.py b/parea/wrapper/openai.py index 635be338..7ac714c2 100644 --- a/parea/wrapper/openai.py +++ b/parea/wrapper/openai.py @@ -1,18 +1,16 @@ -import json from typing import Any, Callable, Dict, Optional, Sequence +import json + import openai -from .wrapper import Wrapper from ..schemas.models import LLMInputs, ModelParams from ..utils.trace_utils import trace_data +from .wrapper import Wrapper class OpenAIWrapper: - original_methods = { - "ChatCompletion.create": openai.ChatCompletion.create, - "ChatCompletion.acreate": openai.ChatCompletion.acreate - } + original_methods = {"ChatCompletion.create": openai.ChatCompletion.create, "ChatCompletion.acreate": openai.ChatCompletion.acreate} @staticmethod def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[Any]) -> Dict: @@ -24,34 +22,29 @@ def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], respon usage = {} llm_inputs = LLMInputs( - model=kwargs.get('model', None), - provider='openai', - messages=kwargs.get('messages', None), - functions=kwargs.get('functions', None), - function_call=kwargs.get('function_call', None), + model=kwargs.get("model", None), + provider="openai", + messages=kwargs.get("messages", None), + functions=kwargs.get("functions", None), + function_call=kwargs.get("function_call", None), model_params=ModelParams( - temp=kwargs.get('temperature', 1.0), - max_length=kwargs.get('max_tokens', None), - top_p=kwargs.get('top_p', 1.0), - frequency_penalty=kwargs.get('frequency_penalty', 0.0), - presence_penalty=kwargs.get('presence_penalty', 0.0), - ) + temp=kwargs.get("temperature", 1.0), + max_length=kwargs.get("max_tokens", None), + top_p=kwargs.get("top_p", 1.0), + frequency_penalty=kwargs.get("frequency_penalty", 0.0), + presence_penalty=kwargs.get("presence_penalty", 0.0), + ), ) trace_data.get()[trace_id].configuration = llm_inputs - trace_data.get()[trace_id].input_tokens = usage.get('prompt_tokens', 0) - trace_data.get()[trace_id].output_tokens = usage.get('completion_tokens', 0) - trace_data.get()[trace_id].total_tokens = usage.get('total_tokens', 0) + trace_data.get()[trace_id].input_tokens = usage.get("prompt_tokens", 0) + trace_data.get()[trace_id].output_tokens = usage.get("completion_tokens", 0) + trace_data.get()[trace_id].total_tokens = usage.get("total_tokens", 0) trace_data.get()[trace_id].output = output @staticmethod def init(log: Callable): - Wrapper( - resolver=OpenAIWrapper.resolver, - log=log, - module=openai, - func_names=list(OpenAIWrapper.original_methods.keys()) - ) + Wrapper(resolver=OpenAIWrapper.resolver, log=log, module=openai, func_names=list(OpenAIWrapper.original_methods.keys())) @staticmethod def _get_output(result) -> str: diff --git a/parea/wrapper/wrapper.py b/parea/wrapper/wrapper.py index 8ce1af4d..1f68358e 100644 --- a/parea/wrapper/wrapper.py +++ b/parea/wrapper/wrapper.py @@ -1,11 +1,12 @@ +from typing import Any, Callable, List, Tuple + import functools import inspect -from typing import Any, Callable, List, Tuple import time from uuid import uuid4 from parea.schemas.models import TraceLog -from parea.utils.trace_utils import to_date_and_time_string, trace_context, trace_data, default_logger +from parea.utils.trace_utils import default_logger, to_date_and_time_string, trace_context, trace_data class Wrapper: @@ -16,17 +17,13 @@ def __init__(self, module: Any, func_names: List[str], resolver: Callable, log: def wrap_functions(self, module: Any, func_names: List[str]): for func_name in func_names: - func_name_parts = func_name.split('.') + func_name_parts = func_name.split(".") original = functools.reduce(getattr, func_name_parts, module) - setattr( - module if len(func_name_parts) == 1 else functools.reduce(getattr, func_name_parts[:-1], module), - func_name_parts[-1], - self._wrapped_func(original) - ) + setattr(module if len(func_name_parts) == 1 else functools.reduce(getattr, func_name_parts[:-1], module), func_name_parts[-1], self._wrapped_func(original)) def _wrapped_func(self, original_func: Callable) -> Callable: unwrapped_func = original_func - while hasattr(original_func, '__wrapped__'): + while hasattr(original_func, "__wrapped__"): unwrapped_func = original_func.__wrapped__ return self._get_decorator(unwrapped_func, original_func) @@ -44,7 +41,7 @@ def _init_trace(self) -> Tuple[str, float]: trace_data.get()[trace_id] = TraceLog( trace_id=trace_id, start_timestamp=to_date_and_time_string(start_time), - trace_name='LLM', + trace_name="LLM", end_user_identifier=None, metadata=None, target=None, @@ -83,6 +80,7 @@ async def wrapper(*args, **kwargs): raise finally: self._cleanup_trace(trace_id, start_time, response, args, kwargs) + return wrapper def sync_decorator(self, orig_func: Callable) -> Callable: @@ -98,6 +96,7 @@ def wrapper(*args, **kwargs): raise finally: self._cleanup_trace(trace_id, start_time, error, response, args, kwargs) + return wrapper def _cleanup_trace(self, trace_id: str, start_time: float, error: str, response: Any, args, kwargs): From 6334369a244f73d7d8a59fb094461065048fc350 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 15:43:10 -0700 Subject: [PATCH 05/10] style: fix style --- parea/cookbook/tracing_with_Parea_sdk.ipynb | 134 ++++++++++---------- 1 file changed, 67 insertions(+), 67 deletions(-) diff --git a/parea/cookbook/tracing_with_Parea_sdk.ipynb b/parea/cookbook/tracing_with_Parea_sdk.ipynb index 6cf1eb64..12167fe5 100644 --- a/parea/cookbook/tracing_with_Parea_sdk.ipynb +++ b/parea/cookbook/tracing_with_Parea_sdk.ipynb @@ -26,8 +26,8 @@ "\n", "## Prerequisites\n", "\n", - "First, install the Parea-ai SDK package. If you have an account with Parea, your LLM API Keys will be automatically used, so you won't need to redefine them here. \n", - "All you need is your Parea API key. Follow the instructions in the [docs](https://docs.parea.ai/api-reference/authentication) to get your api keys. " + "First, install the Parea-ai SDK package. If you have an account with Parea, your LLM API Keys will be automatically used, so you won't need to redefine them here.\n", + "All you need is your Parea API key. Follow the instructions in the [docs](https://docs.parea.ai/api-reference/authentication) to get your api keys." ] }, { @@ -113,50 +113,50 @@ "# We pass the deployment_id and the required inputs to the completion function along with the trace_id\n", "@trace\n", "def argument_generator(query: str, additional_description: str = \"\") -> str:\n", - " return p.completion(\n", - " Completion(\n", - " deployment_id=\"p-Ar-Oi14-nBxHUiradyql9\",\n", - " llm_inputs={\n", - " \"additional_description\": additional_description,\n", - " \"date\": f\"{datetime.now()}\",\n", - " \"query\": query,\n", - " },\n", - " )\n", - " ).content\n", + " return p.completion(\n", + " Completion(\n", + " deployment_id=\"p-Ar-Oi14-nBxHUiradyql9\",\n", + " llm_inputs={\n", + " \"additional_description\": additional_description,\n", + " \"date\": f\"{datetime.now()}\",\n", + " \"query\": query,\n", + " },\n", + " )\n", + " ).content\n", "\n", "\n", "@trace\n", "def critic(argument: str) -> str:\n", - " return p.completion(\n", - " Completion(\n", - " deployment_id=\"p-W2yPy93tAczYrxkipjli6\",\n", - " llm_inputs={\"argument\": argument},\n", - " )\n", - " ).content\n", + " return p.completion(\n", + " Completion(\n", + " deployment_id=\"p-W2yPy93tAczYrxkipjli6\",\n", + " llm_inputs={\"argument\": argument},\n", + " )\n", + " ).content\n", "\n", "\n", "@trace\n", "def refiner(query: str, additional_description: str, current_arg: str, criticism: str) -> str:\n", - " return p.completion(\n", - " Completion(\n", - " deployment_id=\"p-8Er1Xo0GDGF2xtpmMOpbn\",\n", - " llm_inputs={\n", - " \"additional_description\": additional_description,\n", - " \"date\": f\"{datetime.now()}\",\n", - " \"query\": query,\n", - " \"current_arg\": current_arg,\n", - " \"criticism\": criticism,\n", - " },\n", - " )\n", - " ).content\n", + " return p.completion(\n", + " Completion(\n", + " deployment_id=\"p-8Er1Xo0GDGF2xtpmMOpbn\",\n", + " llm_inputs={\n", + " \"additional_description\": additional_description,\n", + " \"date\": f\"{datetime.now()}\",\n", + " \"query\": query,\n", + " \"current_arg\": current_arg,\n", + " \"criticism\": criticism,\n", + " },\n", + " )\n", + " ).content\n", "\n", "\n", "# This is the parent function which orchestrates the chaining. We'll define our trace_id and trace_name here\n", "@trace\n", "def argument_chain(query: str, additional_description: str = \"\") -> str:\n", - " argument = argument_generator(query, additional_description)\n", - " criticism = critic(argument)\n", - " return refiner(query, additional_description, argument, criticism)" + " argument = argument_generator(query, additional_description)\n", + " criticism = critic(argument)\n", + " return refiner(query, additional_description, argument, criticism)" ] }, { @@ -184,8 +184,8 @@ "outputs": [], "source": [ "result = argument_chain(\n", - " \"Whether moonshine is good for you.\",\n", - " additional_description=\"Provide a concise, few sentence argument on why moonshine is good for you.\",\n", + " \"Whether moonshine is good for you.\",\n", + " additional_description=\"Provide a concise, few sentence argument on why moonshine is good for you.\",\n", ")\n", "print(result)" ] @@ -222,10 +222,10 @@ "\n", "@trace\n", "def argument_chain2(query: str, additional_description: str = \"\") -> tuple[str, str]:\n", - " trace_id = get_current_trace_id()\n", - " argument = argument_generator(query, additional_description)\n", - " criticism = critic(argument)\n", - " return refiner(query, additional_description, argument, criticism), trace_id" + " trace_id = get_current_trace_id()\n", + " argument = argument_generator(query, additional_description)\n", + " criticism = critic(argument)\n", + " return refiner(query, additional_description, argument, criticism), trace_id" ] }, { @@ -239,8 +239,8 @@ "outputs": [], "source": [ "result, trace_id = argument_chain2(\n", - " \"Whether moonshine is good for you.\",\n", - " additional_description=\"Provide a concise, few sentence argument on why moonshine is good for you.\",\n", + " \"Whether moonshine is good for you.\",\n", + " additional_description=\"Provide a concise, few sentence argument on why moonshine is good for you.\",\n", ")\n", "print(result)" ] @@ -292,7 +292,7 @@ "One way to make your application traces more useful or actionable is to tag or add metadata to the logs. The completion function accepts additional properties such as:\n", "\n", "- tags: List[str]\n", - "- metadata: Dict[str, str] - arbitrary key-value metadata \n", + "- metadata: Dict[str, str] - arbitrary key-value metadata\n", "- target: str - a gold standard/expected output\n", "- end_user_identifier: str - unique identifier for your end user\n", "\n", @@ -308,18 +308,18 @@ "# let's return the full CompletionResponse to see what other information is returned\n", "@trace\n", "def refiner2(query: str, additional_description: str, current_arg: str, criticism: str) -> CompletionResponse:\n", - " return p.completion(\n", - " Completion(\n", - " deployment_id=\"p-8Er1Xo0GDGF2xtpmMOpbn\",\n", - " llm_inputs={\n", - " \"additional_description\": additional_description,\n", - " \"date\": f\"{datetime.now()}\",\n", - " \"query\": query,\n", - " \"current_arg\": current_arg,\n", - " \"criticism\": criticism,\n", - " },\n", - " )\n", - " )" + " return p.completion(\n", + " Completion(\n", + " deployment_id=\"p-8Er1Xo0GDGF2xtpmMOpbn\",\n", + " llm_inputs={\n", + " \"additional_description\": additional_description,\n", + " \"date\": f\"{datetime.now()}\",\n", + " \"query\": query,\n", + " \"current_arg\": current_arg,\n", + " \"criticism\": criticism,\n", + " },\n", + " )\n", + " )" ], "metadata": { "id": "cXUHZpZbegIn", @@ -348,13 +348,13 @@ "source": [ "# you can also add metadata and tags via the decorator\n", "@trace(\n", - " tags=[\"cookbook-example-deployed\", \"feedback_tracked-deployed\"],\n", - " metadata={\"source\": \"python-sdk\", \"deployed\": True},\n", + " tags=[\"cookbook-example-deployed\", \"feedback_tracked-deployed\"],\n", + " metadata={\"source\": \"python-sdk\", \"deployed\": True},\n", ")\n", "def argument_chain3(query: str, additional_description: str = \"\") -> CompletionResponse:\n", - " argument = argument_generator(query, additional_description)\n", - " criticism = critic(argument)\n", - " return refiner2(query, additional_description, argument, criticism)" + " argument = argument_generator(query, additional_description)\n", + " criticism = critic(argument)\n", + " return refiner2(query, additional_description, argument, criticism)" ] }, { @@ -363,16 +363,16 @@ "import json, attrs\n", "\n", "result = argument_chain3(\n", - " \"Whether moonshine is good for you.\",\n", - " additional_description=\"Provide a concise, few sentence argument on why sunshine is good for you.\",\n", + " \"Whether moonshine is good for you.\",\n", + " additional_description=\"Provide a concise, few sentence argument on why sunshine is good for you.\",\n", ")\n", "\n", "p.record_feedback(\n", - " FeedbackRequest(\n", - " trace_id=result.trace_id,\n", - " score=0.5,\n", - " target=\"Moonshine is nice. Full stop.\",\n", - " )\n", + " FeedbackRequest(\n", + " trace_id=result.trace_id,\n", + " score=0.5,\n", + " target=\"Moonshine is nice. Full stop.\",\n", + " )\n", ")\n", "print(json.dumps(attrs.asdict(result), indent=4))" ], @@ -413,7 +413,7 @@ "## Recap\n", "You made an example LLM application in this walkthrough and instrumented it using Parea's SDK.\n", "\n", - "You also added tags and metadata and even logged feedback to the logs. The SDK integrates wonderfully with your deployed prompts on Parea, keeping your code flexible and lightweight. Now you can iterate, debug, and monitor your application with ease." + "You also added tags and metadata and even logged feedback to the logs. The SDK integrates wonderfully with your deployed prompts on Parea, keeping your code flexible and lightweight. Now you can iterate, debug, and monitor your application with ease.\n" ] } ], From e247380d90d7190ada3400f2aa277da640618a2d Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 15:45:17 -0700 Subject: [PATCH 06/10] add openai --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b93ae436..991f7349 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ attrs~=23.1.0 httpx~=0.24.1 python-dotenv~=1.0.0 contextvars~=2.4.0 +openai From 8f423dcbac722f68ef8411b1c4ff359c8e78ac29 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 15:52:11 -0700 Subject: [PATCH 07/10] add openai --- poetry.lock | 427 ++++++++++++++++++++++++++++++++++++++++++++++++- pyproject.toml | 1 + 2 files changed, 427 insertions(+), 1 deletion(-) diff --git a/poetry.lock b/poetry.lock index e805402a..88d58689 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,5 +1,127 @@ # This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. +[[package]] +name = "aiohttp" +version = "3.8.5" +description = "Async http client/server framework (asyncio)" +optional = false +python-versions = ">=3.6" +files = [ + {file = "aiohttp-3.8.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a94159871304770da4dd371f4291b20cac04e8c94f11bdea1c3478e557fbe0d8"}, + {file = "aiohttp-3.8.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:13bf85afc99ce6f9ee3567b04501f18f9f8dbbb2ea11ed1a2e079670403a7c84"}, + {file = "aiohttp-3.8.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2ce2ac5708501afc4847221a521f7e4b245abf5178cf5ddae9d5b3856ddb2f3a"}, + {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:96943e5dcc37a6529d18766597c491798b7eb7a61d48878611298afc1fca946c"}, + {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ad5c3c4590bb3cc28b4382f031f3783f25ec223557124c68754a2231d989e2b"}, + {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0c413c633d0512df4dc7fd2373ec06cc6a815b7b6d6c2f208ada7e9e93a5061d"}, + {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:df72ac063b97837a80d80dec8d54c241af059cc9bb42c4de68bd5b61ceb37caa"}, + {file = "aiohttp-3.8.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c48c5c0271149cfe467c0ff8eb941279fd6e3f65c9a388c984e0e6cf57538e14"}, + {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:368a42363c4d70ab52c2c6420a57f190ed3dfaca6a1b19afda8165ee16416a82"}, + {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7607ec3ce4993464368505888af5beb446845a014bc676d349efec0e05085905"}, + {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:0d21c684808288a98914e5aaf2a7c6a3179d4df11d249799c32d1808e79503b5"}, + {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:312fcfbacc7880a8da0ae8b6abc6cc7d752e9caa0051a53d217a650b25e9a691"}, + {file = "aiohttp-3.8.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:ad093e823df03bb3fd37e7dec9d4670c34f9e24aeace76808fc20a507cace825"}, + {file = "aiohttp-3.8.5-cp310-cp310-win32.whl", hash = "sha256:33279701c04351a2914e1100b62b2a7fdb9a25995c4a104259f9a5ead7ed4802"}, + {file = "aiohttp-3.8.5-cp310-cp310-win_amd64.whl", hash = "sha256:6e4a280e4b975a2e7745573e3fc9c9ba0d1194a3738ce1cbaa80626cc9b4f4df"}, + {file = "aiohttp-3.8.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ae871a964e1987a943d83d6709d20ec6103ca1eaf52f7e0d36ee1b5bebb8b9b9"}, + {file = "aiohttp-3.8.5-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:461908b2578955045efde733719d62f2b649c404189a09a632d245b445c9c975"}, + {file = "aiohttp-3.8.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:72a860c215e26192379f57cae5ab12b168b75db8271f111019509a1196dfc780"}, + {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cc14be025665dba6202b6a71cfcdb53210cc498e50068bc088076624471f8bb9"}, + {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8af740fc2711ad85f1a5c034a435782fbd5b5f8314c9a3ef071424a8158d7f6b"}, + {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:841cd8233cbd2111a0ef0a522ce016357c5e3aff8a8ce92bcfa14cef890d698f"}, + {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5ed1c46fb119f1b59304b5ec89f834f07124cd23ae5b74288e364477641060ff"}, + {file = "aiohttp-3.8.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:84f8ae3e09a34f35c18fa57f015cc394bd1389bce02503fb30c394d04ee6b938"}, + {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:62360cb771707cb70a6fd114b9871d20d7dd2163a0feafe43fd115cfe4fe845e"}, + {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:23fb25a9f0a1ca1f24c0a371523546366bb642397c94ab45ad3aedf2941cec6a"}, + {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:b0ba0d15164eae3d878260d4c4df859bbdc6466e9e6689c344a13334f988bb53"}, + {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5d20003b635fc6ae3f96d7260281dfaf1894fc3aa24d1888a9b2628e97c241e5"}, + {file = "aiohttp-3.8.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:0175d745d9e85c40dcc51c8f88c74bfbaef9e7afeeeb9d03c37977270303064c"}, + {file = "aiohttp-3.8.5-cp311-cp311-win32.whl", hash = "sha256:2e1b1e51b0774408f091d268648e3d57f7260c1682e7d3a63cb00d22d71bb945"}, + {file = "aiohttp-3.8.5-cp311-cp311-win_amd64.whl", hash = "sha256:043d2299f6dfdc92f0ac5e995dfc56668e1587cea7f9aa9d8a78a1b6554e5755"}, + {file = "aiohttp-3.8.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cae533195e8122584ec87531d6df000ad07737eaa3c81209e85c928854d2195c"}, + {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4f21e83f355643c345177a5d1d8079f9f28b5133bcd154193b799d380331d5d3"}, + {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7a75ef35f2df54ad55dbf4b73fe1da96f370e51b10c91f08b19603c64004acc"}, + {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e2e9839e14dd5308ee773c97115f1e0a1cb1d75cbeeee9f33824fa5144c7634"}, + {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c44e65da1de4403d0576473e2344828ef9c4c6244d65cf4b75549bb46d40b8dd"}, + {file = "aiohttp-3.8.5-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78d847e4cde6ecc19125ccbc9bfac4a7ab37c234dd88fbb3c5c524e8e14da543"}, + {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:c7a815258e5895d8900aec4454f38dca9aed71085f227537208057853f9d13f2"}, + {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:8b929b9bd7cd7c3939f8bcfffa92fae7480bd1aa425279d51a89327d600c704d"}, + {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_ppc64le.whl", hash = "sha256:5db3a5b833764280ed7618393832e0853e40f3d3e9aa128ac0ba0f8278d08649"}, + {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_s390x.whl", hash = "sha256:a0215ce6041d501f3155dc219712bc41252d0ab76474615b9700d63d4d9292af"}, + {file = "aiohttp-3.8.5-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:fd1ed388ea7fbed22c4968dd64bab0198de60750a25fe8c0c9d4bef5abe13824"}, + {file = "aiohttp-3.8.5-cp36-cp36m-win32.whl", hash = "sha256:6e6783bcc45f397fdebc118d772103d751b54cddf5b60fbcc958382d7dd64f3e"}, + {file = "aiohttp-3.8.5-cp36-cp36m-win_amd64.whl", hash = "sha256:b5411d82cddd212644cf9360879eb5080f0d5f7d809d03262c50dad02f01421a"}, + {file = "aiohttp-3.8.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:01d4c0c874aa4ddfb8098e85d10b5e875a70adc63db91f1ae65a4b04d3344cda"}, + {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e5980a746d547a6ba173fd5ee85ce9077e72d118758db05d229044b469d9029a"}, + {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2a482e6da906d5e6e653be079b29bc173a48e381600161c9932d89dfae5942ef"}, + {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:80bd372b8d0715c66c974cf57fe363621a02f359f1ec81cba97366948c7fc873"}, + {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c1161b345c0a444ebcf46bf0a740ba5dcf50612fd3d0528883fdc0eff578006a"}, + {file = "aiohttp-3.8.5-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cd56db019015b6acfaaf92e1ac40eb8434847d9bf88b4be4efe5bfd260aee692"}, + {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:153c2549f6c004d2754cc60603d4668899c9895b8a89397444a9c4efa282aaf4"}, + {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:4a01951fabc4ce26ab791da5f3f24dca6d9a6f24121746eb19756416ff2d881b"}, + {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:bfb9162dcf01f615462b995a516ba03e769de0789de1cadc0f916265c257e5d8"}, + {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:7dde0009408969a43b04c16cbbe252c4f5ef4574ac226bc8815cd7342d2028b6"}, + {file = "aiohttp-3.8.5-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:4149d34c32f9638f38f544b3977a4c24052042affa895352d3636fa8bffd030a"}, + {file = "aiohttp-3.8.5-cp37-cp37m-win32.whl", hash = "sha256:68c5a82c8779bdfc6367c967a4a1b2aa52cd3595388bf5961a62158ee8a59e22"}, + {file = "aiohttp-3.8.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2cf57fb50be5f52bda004b8893e63b48530ed9f0d6c96c84620dc92fe3cd9b9d"}, + {file = "aiohttp-3.8.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:eca4bf3734c541dc4f374ad6010a68ff6c6748f00451707f39857f429ca36ced"}, + {file = "aiohttp-3.8.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1274477e4c71ce8cfe6c1ec2f806d57c015ebf84d83373676036e256bc55d690"}, + {file = "aiohttp-3.8.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:28c543e54710d6158fc6f439296c7865b29e0b616629767e685a7185fab4a6b9"}, + {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:910bec0c49637d213f5d9877105d26e0c4a4de2f8b1b29405ff37e9fc0ad52b8"}, + {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5443910d662db951b2e58eb70b0fbe6b6e2ae613477129a5805d0b66c54b6cb7"}, + {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2e460be6978fc24e3df83193dc0cc4de46c9909ed92dd47d349a452ef49325b7"}, + {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb1558def481d84f03b45888473fc5a1f35747b5f334ef4e7a571bc0dfcb11f8"}, + {file = "aiohttp-3.8.5-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:34dd0c107799dcbbf7d48b53be761a013c0adf5571bf50c4ecad5643fe9cfcd0"}, + {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aa1990247f02a54185dc0dff92a6904521172a22664c863a03ff64c42f9b5410"}, + {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0e584a10f204a617d71d359fe383406305a4b595b333721fa50b867b4a0a1548"}, + {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:a3cf433f127efa43fee6b90ea4c6edf6c4a17109d1d037d1a52abec84d8f2e42"}, + {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:c11f5b099adafb18e65c2c997d57108b5bbeaa9eeee64a84302c0978b1ec948b"}, + {file = "aiohttp-3.8.5-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:84de26ddf621d7ac4c975dbea4c945860e08cccde492269db4e1538a6a6f3c35"}, + {file = "aiohttp-3.8.5-cp38-cp38-win32.whl", hash = "sha256:ab88bafedc57dd0aab55fa728ea10c1911f7e4d8b43e1d838a1739f33712921c"}, + {file = "aiohttp-3.8.5-cp38-cp38-win_amd64.whl", hash = "sha256:5798a9aad1879f626589f3df0f8b79b3608a92e9beab10e5fda02c8a2c60db2e"}, + {file = "aiohttp-3.8.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a6ce61195c6a19c785df04e71a4537e29eaa2c50fe745b732aa937c0c77169f3"}, + {file = "aiohttp-3.8.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:773dd01706d4db536335fcfae6ea2440a70ceb03dd3e7378f3e815b03c97ab51"}, + {file = "aiohttp-3.8.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f83a552443a526ea38d064588613aca983d0ee0038801bc93c0c916428310c28"}, + {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1f7372f7341fcc16f57b2caded43e81ddd18df53320b6f9f042acad41f8e049a"}, + {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea353162f249c8097ea63c2169dd1aa55de1e8fecbe63412a9bc50816e87b761"}, + {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e5d47ae48db0b2dcf70bc8a3bc72b3de86e2a590fc299fdbbb15af320d2659de"}, + {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d827176898a2b0b09694fbd1088c7a31836d1a505c243811c87ae53a3f6273c1"}, + {file = "aiohttp-3.8.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3562b06567c06439d8b447037bb655ef69786c590b1de86c7ab81efe1c9c15d8"}, + {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4e874cbf8caf8959d2adf572a78bba17cb0e9d7e51bb83d86a3697b686a0ab4d"}, + {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:6809a00deaf3810e38c628e9a33271892f815b853605a936e2e9e5129762356c"}, + {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:33776e945d89b29251b33a7e7d006ce86447b2cfd66db5e5ded4e5cd0340585c"}, + {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:eaeed7abfb5d64c539e2db173f63631455f1196c37d9d8d873fc316470dfbacd"}, + {file = "aiohttp-3.8.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e91d635961bec2d8f19dfeb41a539eb94bd073f075ca6dae6c8dc0ee89ad6f91"}, + {file = "aiohttp-3.8.5-cp39-cp39-win32.whl", hash = "sha256:00ad4b6f185ec67f3e6562e8a1d2b69660be43070bd0ef6fcec5211154c7df67"}, + {file = "aiohttp-3.8.5-cp39-cp39-win_amd64.whl", hash = "sha256:c0a9034379a37ae42dea7ac1e048352d96286626251862e448933c0f59cbd79c"}, + {file = "aiohttp-3.8.5.tar.gz", hash = "sha256:b9552ec52cc147dbf1944ac7ac98af7602e51ea2dcd076ed194ca3c0d1c7d0bc"}, +] + +[package.dependencies] +aiosignal = ">=1.1.2" +async-timeout = ">=4.0.0a3,<5.0" +attrs = ">=17.3.0" +charset-normalizer = ">=2.0,<4.0" +frozenlist = ">=1.1.1" +multidict = ">=4.5,<7.0" +yarl = ">=1.0,<2.0" + +[package.extras] +speedups = ["Brotli", "aiodns", "cchardet"] + +[[package]] +name = "aiosignal" +version = "1.3.1" +description = "aiosignal: a list of registered asynchronous callbacks" +optional = false +python-versions = ">=3.7" +files = [ + {file = "aiosignal-1.3.1-py3-none-any.whl", hash = "sha256:f8376fb07dd1e86a584e4fcdec80b36b7f81aac666ebc724e2c090300dd83b17"}, + {file = "aiosignal-1.3.1.tar.gz", hash = "sha256:54cd96e15e1649b75d6c87526a6ff0b6c1b0dd3459f43d9ca11d48c339b68cfc"}, +] + +[package.dependencies] +frozenlist = ">=1.1.0" + [[package]] name = "anyio" version = "3.7.1" @@ -153,6 +275,17 @@ files = [ [package.dependencies] typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.11\""} +[[package]] +name = "async-timeout" +version = "4.0.3" +description = "Timeout context manager for asyncio programs" +optional = false +python-versions = ">=3.7" +files = [ + {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, + {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, +] + [[package]] name = "attrs" version = "23.1.0" @@ -979,6 +1112,76 @@ files = [ {file = "fqdn-1.5.1.tar.gz", hash = "sha256:105ed3677e767fb5ca086a0c1f4bb66ebc3c100be518f0e0d755d9eae164d89f"}, ] +[[package]] +name = "frozenlist" +version = "1.4.0" +description = "A list-like structure which implements collections.abc.MutableSequence" +optional = false +python-versions = ">=3.8" +files = [ + {file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:764226ceef3125e53ea2cb275000e309c0aa5464d43bd72abd661e27fffc26ab"}, + {file = "frozenlist-1.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d6484756b12f40003c6128bfcc3fa9f0d49a687e171186c2d85ec82e3758c559"}, + {file = "frozenlist-1.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9ac08e601308e41eb533f232dbf6b7e4cea762f9f84f6357136eed926c15d12c"}, + {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d081f13b095d74b67d550de04df1c756831f3b83dc9881c38985834387487f1b"}, + {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:71932b597f9895f011f47f17d6428252fc728ba2ae6024e13c3398a087c2cdea"}, + {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:981b9ab5a0a3178ff413bca62526bb784249421c24ad7381e39d67981be2c326"}, + {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e41f3de4df3e80de75845d3e743b3f1c4c8613c3997a912dbf0229fc61a8b963"}, + {file = "frozenlist-1.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6918d49b1f90821e93069682c06ffde41829c346c66b721e65a5c62b4bab0300"}, + {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:0e5c8764c7829343d919cc2dfc587a8db01c4f70a4ebbc49abde5d4b158b007b"}, + {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8d0edd6b1c7fb94922bf569c9b092ee187a83f03fb1a63076e7774b60f9481a8"}, + {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:e29cda763f752553fa14c68fb2195150bfab22b352572cb36c43c47bedba70eb"}, + {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:0c7c1b47859ee2cac3846fde1c1dc0f15da6cec5a0e5c72d101e0f83dcb67ff9"}, + {file = "frozenlist-1.4.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:901289d524fdd571be1c7be054f48b1f88ce8dddcbdf1ec698b27d4b8b9e5d62"}, + {file = "frozenlist-1.4.0-cp310-cp310-win32.whl", hash = "sha256:1a0848b52815006ea6596c395f87449f693dc419061cc21e970f139d466dc0a0"}, + {file = "frozenlist-1.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:b206646d176a007466358aa21d85cd8600a415c67c9bd15403336c331a10d956"}, + {file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:de343e75f40e972bae1ef6090267f8260c1446a1695e77096db6cfa25e759a95"}, + {file = "frozenlist-1.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ad2a9eb6d9839ae241701d0918f54c51365a51407fd80f6b8289e2dfca977cc3"}, + {file = "frozenlist-1.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:bd7bd3b3830247580de99c99ea2a01416dfc3c34471ca1298bccabf86d0ff4dc"}, + {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bdf1847068c362f16b353163391210269e4f0569a3c166bc6a9f74ccbfc7e839"}, + {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:38461d02d66de17455072c9ba981d35f1d2a73024bee7790ac2f9e361ef1cd0c"}, + {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5a32087d720c608f42caed0ef36d2b3ea61a9d09ee59a5142d6070da9041b8f"}, + {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:dd65632acaf0d47608190a71bfe46b209719bf2beb59507db08ccdbe712f969b"}, + {file = "frozenlist-1.4.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:261b9f5d17cac914531331ff1b1d452125bf5daa05faf73b71d935485b0c510b"}, + {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:b89ac9768b82205936771f8d2eb3ce88503b1556324c9f903e7156669f521472"}, + {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:008eb8b31b3ea6896da16c38c1b136cb9fec9e249e77f6211d479db79a4eaf01"}, + {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:e74b0506fa5aa5598ac6a975a12aa8928cbb58e1f5ac8360792ef15de1aa848f"}, + {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:490132667476f6781b4c9458298b0c1cddf237488abd228b0b3650e5ecba7467"}, + {file = "frozenlist-1.4.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:76d4711f6f6d08551a7e9ef28c722f4a50dd0fc204c56b4bcd95c6cc05ce6fbb"}, + {file = "frozenlist-1.4.0-cp311-cp311-win32.whl", hash = "sha256:a02eb8ab2b8f200179b5f62b59757685ae9987996ae549ccf30f983f40602431"}, + {file = "frozenlist-1.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:515e1abc578dd3b275d6a5114030b1330ba044ffba03f94091842852f806f1c1"}, + {file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:f0ed05f5079c708fe74bf9027e95125334b6978bf07fd5ab923e9e55e5fbb9d3"}, + {file = "frozenlist-1.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ca265542ca427bf97aed183c1676e2a9c66942e822b14dc6e5f42e038f92a503"}, + {file = "frozenlist-1.4.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:491e014f5c43656da08958808588cc6c016847b4360e327a62cb308c791bd2d9"}, + {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:17ae5cd0f333f94f2e03aaf140bb762c64783935cc764ff9c82dff626089bebf"}, + {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1e78fb68cf9c1a6aa4a9a12e960a5c9dfbdb89b3695197aa7064705662515de2"}, + {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d5655a942f5f5d2c9ed93d72148226d75369b4f6952680211972a33e59b1dfdc"}, + {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c11b0746f5d946fecf750428a95f3e9ebe792c1ee3b1e96eeba145dc631a9672"}, + {file = "frozenlist-1.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e66d2a64d44d50d2543405fb183a21f76b3b5fd16f130f5c99187c3fb4e64919"}, + {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:88f7bc0fcca81f985f78dd0fa68d2c75abf8272b1f5c323ea4a01a4d7a614efc"}, + {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:5833593c25ac59ede40ed4de6d67eb42928cca97f26feea219f21d0ed0959b79"}, + {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:fec520865f42e5c7f050c2a79038897b1c7d1595e907a9e08e3353293ffc948e"}, + {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:b826d97e4276750beca7c8f0f1a4938892697a6bcd8ec8217b3312dad6982781"}, + {file = "frozenlist-1.4.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ceb6ec0a10c65540421e20ebd29083c50e6d1143278746a4ef6bcf6153171eb8"}, + {file = "frozenlist-1.4.0-cp38-cp38-win32.whl", hash = "sha256:2b8bcf994563466db019fab287ff390fffbfdb4f905fc77bc1c1d604b1c689cc"}, + {file = "frozenlist-1.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:a6c8097e01886188e5be3e6b14e94ab365f384736aa1fca6a0b9e35bd4a30bc7"}, + {file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6c38721585f285203e4b4132a352eb3daa19121a035f3182e08e437cface44bf"}, + {file = "frozenlist-1.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a0c6da9aee33ff0b1a451e867da0c1f47408112b3391dd43133838339e410963"}, + {file = "frozenlist-1.4.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:93ea75c050c5bb3d98016b4ba2497851eadf0ac154d88a67d7a6816206f6fa7f"}, + {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f61e2dc5ad442c52b4887f1fdc112f97caeff4d9e6ebe78879364ac59f1663e1"}, + {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:aa384489fefeb62321b238e64c07ef48398fe80f9e1e6afeff22e140e0850eef"}, + {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:10ff5faaa22786315ef57097a279b833ecab1a0bfb07d604c9cbb1c4cdc2ed87"}, + {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:007df07a6e3eb3e33e9a1fe6a9db7af152bbd8a185f9aaa6ece10a3529e3e1c6"}, + {file = "frozenlist-1.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7f4f399d28478d1f604c2ff9119907af9726aed73680e5ed1ca634d377abb087"}, + {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c5374b80521d3d3f2ec5572e05adc94601985cc526fb276d0c8574a6d749f1b3"}, + {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:ce31ae3e19f3c902de379cf1323d90c649425b86de7bbdf82871b8a2a0615f3d"}, + {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:7211ef110a9194b6042449431e08c4d80c0481e5891e58d429df5899690511c2"}, + {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:556de4430ce324c836789fa4560ca62d1591d2538b8ceb0b4f68fb7b2384a27a"}, + {file = "frozenlist-1.4.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:7645a8e814a3ee34a89c4a372011dcd817964ce8cb273c8ed6119d706e9613e3"}, + {file = "frozenlist-1.4.0-cp39-cp39-win32.whl", hash = "sha256:19488c57c12d4e8095a922f328df3f179c820c212940a498623ed39160bc3c2f"}, + {file = "frozenlist-1.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:6221d84d463fb110bdd7619b69cb43878a11d51cbb9394ae3105d082d5199167"}, + {file = "frozenlist-1.4.0.tar.gz", hash = "sha256:09163bdf0b2907454042edb19f887c6d33806adc71fbd54afc14908bfdc22251"}, +] + [[package]] name = "gitdb" version = "4.0.10" @@ -2002,6 +2205,89 @@ files = [ {file = "msgpack-1.0.5.tar.gz", hash = "sha256:c075544284eadc5cddc70f4757331d99dcbc16b2bbd4849d15f8aae4cf36d31c"}, ] +[[package]] +name = "multidict" +version = "6.0.4" +description = "multidict implementation" +optional = false +python-versions = ">=3.7" +files = [ + {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b1a97283e0c85772d613878028fec909f003993e1007eafa715b24b377cb9b8"}, + {file = "multidict-6.0.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:eeb6dcc05e911516ae3d1f207d4b0520d07f54484c49dfc294d6e7d63b734171"}, + {file = "multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:d6d635d5209b82a3492508cf5b365f3446afb65ae7ebd755e70e18f287b0adf7"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c048099e4c9e9d615545e2001d3d8a4380bd403e1a0578734e0d31703d1b0c0b"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ea20853c6dbbb53ed34cb4d080382169b6f4554d394015f1bef35e881bf83547"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:16d232d4e5396c2efbbf4f6d4df89bfa905eb0d4dc5b3549d872ab898451f569"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c63aaa167f6c6b04ef2c85704e93af16c11d20de1d133e39de6a0e84582a93"}, + {file = "multidict-6.0.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:64bdf1086b6043bf519869678f5f2757f473dee970d7abf6da91ec00acb9cb98"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:43644e38f42e3af682690876cff722d301ac585c5b9e1eacc013b7a3f7b696a0"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:7582a1d1030e15422262de9f58711774e02fa80df0d1578995c76214f6954988"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:ddff9c4e225a63a5afab9dd15590432c22e8057e1a9a13d28ed128ecf047bbdc"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:ee2a1ece51b9b9e7752e742cfb661d2a29e7bcdba2d27e66e28a99f1890e4fa0"}, + {file = "multidict-6.0.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:a2e4369eb3d47d2034032a26c7a80fcb21a2cb22e1173d761a162f11e562caa5"}, + {file = "multidict-6.0.4-cp310-cp310-win32.whl", hash = "sha256:574b7eae1ab267e5f8285f0fe881f17efe4b98c39a40858247720935b893bba8"}, + {file = "multidict-6.0.4-cp310-cp310-win_amd64.whl", hash = "sha256:4dcbb0906e38440fa3e325df2359ac6cb043df8e58c965bb45f4e406ecb162cc"}, + {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:0dfad7a5a1e39c53ed00d2dd0c2e36aed4650936dc18fd9a1826a5ae1cad6f03"}, + {file = "multidict-6.0.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:64da238a09d6039e3bd39bb3aee9c21a5e34f28bfa5aa22518581f910ff94af3"}, + {file = "multidict-6.0.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:ff959bee35038c4624250473988b24f846cbeb2c6639de3602c073f10410ceba"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:01a3a55bd90018c9c080fbb0b9f4891db37d148a0a18722b42f94694f8b6d4c9"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c5cb09abb18c1ea940fb99360ea0396f34d46566f157122c92dfa069d3e0e982"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:666daae833559deb2d609afa4490b85830ab0dfca811a98b70a205621a6109fe"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:11bdf3f5e1518b24530b8241529d2050014c884cf18b6fc69c0c2b30ca248710"}, + {file = "multidict-6.0.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7d18748f2d30f94f498e852c67d61261c643b349b9d2a581131725595c45ec6c"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:458f37be2d9e4c95e2d8866a851663cbc76e865b78395090786f6cd9b3bbf4f4"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:b1a2eeedcead3a41694130495593a559a668f382eee0727352b9a41e1c45759a"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7d6ae9d593ef8641544d6263c7fa6408cc90370c8cb2bbb65f8d43e5b0351d9c"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:5979b5632c3e3534e42ca6ff856bb24b2e3071b37861c2c727ce220d80eee9ed"}, + {file = "multidict-6.0.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:dcfe792765fab89c365123c81046ad4103fcabbc4f56d1c1997e6715e8015461"}, + {file = "multidict-6.0.4-cp311-cp311-win32.whl", hash = "sha256:3601a3cece3819534b11d4efc1eb76047488fddd0c85a3948099d5da4d504636"}, + {file = "multidict-6.0.4-cp311-cp311-win_amd64.whl", hash = "sha256:81a4f0b34bd92df3da93315c6a59034df95866014ac08535fc819f043bfd51f0"}, + {file = "multidict-6.0.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:67040058f37a2a51ed8ea8f6b0e6ee5bd78ca67f169ce6122f3e2ec80dfe9b78"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:853888594621e6604c978ce2a0444a1e6e70c8d253ab65ba11657659dcc9100f"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39ff62e7d0f26c248b15e364517a72932a611a9b75f35b45be078d81bdb86603"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:af048912e045a2dc732847d33821a9d84ba553f5c5f028adbd364dd4765092ac"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1e8b901e607795ec06c9e42530788c45ac21ef3aaa11dbd0c69de543bfb79a9"}, + {file = "multidict-6.0.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62501642008a8b9871ddfccbf83e4222cf8ac0d5aeedf73da36153ef2ec222d2"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:99b76c052e9f1bc0721f7541e5e8c05db3941eb9ebe7b8553c625ef88d6eefde"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:509eac6cf09c794aa27bcacfd4d62c885cce62bef7b2c3e8b2e49d365b5003fe"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:21a12c4eb6ddc9952c415f24eef97e3e55ba3af61f67c7bc388dcdec1404a067"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:5cad9430ab3e2e4fa4a2ef4450f548768400a2ac635841bc2a56a2052cdbeb87"}, + {file = "multidict-6.0.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:ab55edc2e84460694295f401215f4a58597f8f7c9466faec545093045476327d"}, + {file = "multidict-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:5a4dcf02b908c3b8b17a45fb0f15b695bf117a67b76b7ad18b73cf8e92608775"}, + {file = "multidict-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:6ed5f161328b7df384d71b07317f4d8656434e34591f20552c7bcef27b0ab88e"}, + {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5fc1b16f586f049820c5c5b17bb4ee7583092fa0d1c4e28b5239181ff9532e0c"}, + {file = "multidict-6.0.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1502e24330eb681bdaa3eb70d6358e818e8e8f908a22a1851dfd4e15bc2f8161"}, + {file = "multidict-6.0.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b692f419760c0e65d060959df05f2a531945af31fda0c8a3b3195d4efd06de11"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45e1ecb0379bfaab5eef059f50115b54571acfbe422a14f668fc8c27ba410e7e"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ddd3915998d93fbcd2566ddf9cf62cdb35c9e093075f862935573d265cf8f65d"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:59d43b61c59d82f2effb39a93c48b845efe23a3852d201ed2d24ba830d0b4cf2"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cc8e1d0c705233c5dd0c5e6460fbad7827d5d36f310a0fadfd45cc3029762258"}, + {file = "multidict-6.0.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d6aa0418fcc838522256761b3415822626f866758ee0bc6632c9486b179d0b52"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6748717bb10339c4760c1e63da040f5f29f5ed6e59d76daee30305894069a660"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:4d1a3d7ef5e96b1c9e92f973e43aa5e5b96c659c9bc3124acbbd81b0b9c8a951"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:4372381634485bec7e46718edc71528024fcdc6f835baefe517b34a33c731d60"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:fc35cb4676846ef752816d5be2193a1e8367b4c1397b74a565a9d0389c433a1d"}, + {file = "multidict-6.0.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:4b9d9e4e2b37daddb5c23ea33a3417901fa7c7b3dee2d855f63ee67a0b21e5b1"}, + {file = "multidict-6.0.4-cp38-cp38-win32.whl", hash = "sha256:e41b7e2b59679edfa309e8db64fdf22399eec4b0b24694e1b2104fb789207779"}, + {file = "multidict-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:d6c254ba6e45d8e72739281ebc46ea5eb5f101234f3ce171f0e9f5cc86991480"}, + {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:16ab77bbeb596e14212e7bab8429f24c1579234a3a462105cda4a66904998664"}, + {file = "multidict-6.0.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc779e9e6f7fda81b3f9aa58e3a6091d49ad528b11ed19f6621408806204ad35"}, + {file = "multidict-6.0.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:4ceef517eca3e03c1cceb22030a3e39cb399ac86bff4e426d4fc6ae49052cc60"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:281af09f488903fde97923c7744bb001a9b23b039a909460d0f14edc7bf59706"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:52f2dffc8acaba9a2f27174c41c9e57f60b907bb9f096b36b1a1f3be71c6284d"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b41156839806aecb3641f3208c0dafd3ac7775b9c4c422d82ee2a45c34ba81ca"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d5e3fc56f88cc98ef8139255cf8cd63eb2c586531e43310ff859d6bb3a6b51f1"}, + {file = "multidict-6.0.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8316a77808c501004802f9beebde51c9f857054a0c871bd6da8280e718444449"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:f70b98cd94886b49d91170ef23ec5c0e8ebb6f242d734ed7ed677b24d50c82cf"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:bf6774e60d67a9efe02b3616fee22441d86fab4c6d335f9d2051d19d90a40063"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:e69924bfcdda39b722ef4d9aa762b2dd38e4632b3641b1d9a57ca9cd18f2f83a"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:6b181d8c23da913d4ff585afd1155a0e1194c0b50c54fcfe286f70cdaf2b7176"}, + {file = "multidict-6.0.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:52509b5be062d9eafc8170e53026fbc54cf3b32759a23d07fd935fb04fc22d95"}, + {file = "multidict-6.0.4-cp39-cp39-win32.whl", hash = "sha256:27c523fbfbdfd19c6867af7346332b62b586eed663887392cff78d614f9ec313"}, + {file = "multidict-6.0.4-cp39-cp39-win_amd64.whl", hash = "sha256:33029f5734336aa0d4c0384525da0387ef89148dc7191aae00ca5fb23d7aafc2"}, + {file = "multidict-6.0.4.tar.gz", hash = "sha256:3666906492efb76453c0e7b97f2cf459b0682e7402c0489a95484965dbc1da49"}, +] + [[package]] name = "mypy" version = "1.5.1" @@ -2205,6 +2491,28 @@ jupyter-server = ">=1.8,<3" [package.extras] test = ["pytest", "pytest-console-scripts", "pytest-jupyter", "pytest-tornasync"] +[[package]] +name = "openai" +version = "0.27.9" +description = "Python client library for the OpenAI API" +optional = false +python-versions = ">=3.7.1" +files = [ + {file = "openai-0.27.9-py3-none-any.whl", hash = "sha256:6a3cf8e276d1a6262b50562fbc0cba7967cfebb78ed827d375986b48fdad6475"}, + {file = "openai-0.27.9.tar.gz", hash = "sha256:b687761c82f5ebb6f61efc791b2083d2d068277b94802d4d1369efe39851813d"}, +] + +[package.dependencies] +aiohttp = "*" +requests = ">=2.20" +tqdm = "*" + +[package.extras] +datalib = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)"] +dev = ["black (>=21.6b0,<22.0)", "pytest (==6.*)", "pytest-asyncio", "pytest-mock"] +embeddings = ["matplotlib", "numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "plotly", "scikit-learn (>=1.0.2)", "scipy", "tenacity (>=8.0.1)"] +wandb = ["numpy", "openpyxl (>=3.0.7)", "pandas (>=1.2.3)", "pandas-stubs (>=1.1.0.11)", "wandb"] + [[package]] name = "overrides" version = "7.4.0" @@ -2836,6 +3144,7 @@ files = [ {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d"}, {file = "PyYAML-6.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515"}, + {file = "PyYAML-6.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290"}, {file = "PyYAML-6.0.1-cp310-cp310-win32.whl", hash = "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924"}, {file = "PyYAML-6.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d"}, {file = "PyYAML-6.0.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007"}, @@ -2843,8 +3152,15 @@ files = [ {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc"}, {file = "PyYAML-6.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673"}, + {file = "PyYAML-6.0.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b"}, {file = "PyYAML-6.0.1-cp311-cp311-win32.whl", hash = "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741"}, {file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28"}, + {file = "PyYAML-6.0.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9"}, + {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0"}, + {file = "PyYAML-6.0.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4"}, + {file = "PyYAML-6.0.1-cp312-cp312-win32.whl", hash = "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54"}, + {file = "PyYAML-6.0.1-cp312-cp312-win_amd64.whl", hash = "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df"}, {file = "PyYAML-6.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98"}, {file = "PyYAML-6.0.1-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c"}, @@ -2861,6 +3177,7 @@ files = [ {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696"}, {file = "PyYAML-6.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735"}, + {file = "PyYAML-6.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6"}, {file = "PyYAML-6.0.1-cp38-cp38-win32.whl", hash = "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206"}, {file = "PyYAML-6.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62"}, {file = "PyYAML-6.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8"}, @@ -2868,6 +3185,7 @@ files = [ {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0"}, {file = "PyYAML-6.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c"}, + {file = "PyYAML-6.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5"}, {file = "PyYAML-6.0.1-cp39-cp39-win32.whl", hash = "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c"}, {file = "PyYAML-6.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486"}, {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, @@ -3530,6 +3848,26 @@ files = [ {file = "tornado-6.3.3.tar.gz", hash = "sha256:e7d8db41c0181c80d76c982aacc442c0783a2c54d6400fe028954201a2e032fe"}, ] +[[package]] +name = "tqdm" +version = "4.66.1" +description = "Fast, Extensible Progress Meter" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tqdm-4.66.1-py3-none-any.whl", hash = "sha256:d302b3c5b53d47bce91fea46679d9c3c6508cf6332229aa1e7d8653723793386"}, + {file = "tqdm-4.66.1.tar.gz", hash = "sha256:d88e651f9db8d8551a62556d3cff9e3034274ca5d66e93197cf2490e2dcb69c7"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "platform_system == \"Windows\""} + +[package.extras] +dev = ["pytest (>=6)", "pytest-cov", "pytest-timeout", "pytest-xdist"] +notebook = ["ipywidgets (>=6)"] +slack = ["slack-sdk"] +telegram = ["requests"] + [[package]] name = "traitlets" version = "5.9.0" @@ -3850,6 +4188,93 @@ files = [ [package.dependencies] cffi = ">=1.0" +[[package]] +name = "yarl" +version = "1.9.2" +description = "Yet another URL library" +optional = false +python-versions = ">=3.7" +files = [ + {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:8c2ad583743d16ddbdf6bb14b5cd76bf43b0d0006e918809d5d4ddf7bde8dd82"}, + {file = "yarl-1.9.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:82aa6264b36c50acfb2424ad5ca537a2060ab6de158a5bd2a72a032cc75b9eb8"}, + {file = "yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c0c77533b5ed4bcc38e943178ccae29b9bcf48ffd1063f5821192f23a1bd27b9"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ee4afac41415d52d53a9833ebae7e32b344be72835bbb589018c9e938045a560"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9bf345c3a4f5ba7f766430f97f9cc1320786f19584acc7086491f45524a551ac"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2a96c19c52ff442a808c105901d0bdfd2e28575b3d5f82e2f5fd67e20dc5f4ea"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:891c0e3ec5ec881541f6c5113d8df0315ce5440e244a716b95f2525b7b9f3608"}, + {file = "yarl-1.9.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c3a53ba34a636a256d767c086ceb111358876e1fb6b50dfc4d3f4951d40133d5"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:566185e8ebc0898b11f8026447eacd02e46226716229cea8db37496c8cdd26e0"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:2b0738fb871812722a0ac2154be1f049c6223b9f6f22eec352996b69775b36d4"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:32f1d071b3f362c80f1a7d322bfd7b2d11e33d2adf395cc1dd4df36c9c243095"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:e9fdc7ac0d42bc3ea78818557fab03af6181e076a2944f43c38684b4b6bed8e3"}, + {file = "yarl-1.9.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:56ff08ab5df8429901ebdc5d15941b59f6253393cb5da07b4170beefcf1b2528"}, + {file = "yarl-1.9.2-cp310-cp310-win32.whl", hash = "sha256:8ea48e0a2f931064469bdabca50c2f578b565fc446f302a79ba6cc0ee7f384d3"}, + {file = "yarl-1.9.2-cp310-cp310-win_amd64.whl", hash = "sha256:50f33040f3836e912ed16d212f6cc1efb3231a8a60526a407aeb66c1c1956dde"}, + {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:646d663eb2232d7909e6601f1a9107e66f9791f290a1b3dc7057818fe44fc2b6"}, + {file = "yarl-1.9.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:aff634b15beff8902d1f918012fc2a42e0dbae6f469fce134c8a0dc51ca423bb"}, + {file = "yarl-1.9.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a83503934c6273806aed765035716216cc9ab4e0364f7f066227e1aaea90b8d0"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b25322201585c69abc7b0e89e72790469f7dad90d26754717f3310bfe30331c2"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:22a94666751778629f1ec4280b08eb11815783c63f52092a5953faf73be24191"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:8ec53a0ea2a80c5cd1ab397925f94bff59222aa3cf9c6da938ce05c9ec20428d"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:159d81f22d7a43e6eabc36d7194cb53f2f15f498dbbfa8edc8a3239350f59fe7"}, + {file = "yarl-1.9.2-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:832b7e711027c114d79dffb92576acd1bd2decc467dec60e1cac96912602d0e6"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:95d2ecefbcf4e744ea952d073c6922e72ee650ffc79028eb1e320e732898d7e8"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:d4e2c6d555e77b37288eaf45b8f60f0737c9efa3452c6c44626a5455aeb250b9"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:783185c75c12a017cc345015ea359cc801c3b29a2966c2655cd12b233bf5a2be"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:b8cc1863402472f16c600e3e93d542b7e7542a540f95c30afd472e8e549fc3f7"}, + {file = "yarl-1.9.2-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:822b30a0f22e588b32d3120f6d41e4ed021806418b4c9f0bc3048b8c8cb3f92a"}, + {file = "yarl-1.9.2-cp311-cp311-win32.whl", hash = "sha256:a60347f234c2212a9f0361955007fcf4033a75bf600a33c88a0a8e91af77c0e8"}, + {file = "yarl-1.9.2-cp311-cp311-win_amd64.whl", hash = "sha256:be6b3fdec5c62f2a67cb3f8c6dbf56bbf3f61c0f046f84645cd1ca73532ea051"}, + {file = "yarl-1.9.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:38a3928ae37558bc1b559f67410df446d1fbfa87318b124bf5032c31e3447b74"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ac9bb4c5ce3975aeac288cfcb5061ce60e0d14d92209e780c93954076c7c4367"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3da8a678ca8b96c8606bbb8bfacd99a12ad5dd288bc6f7979baddd62f71c63ef"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:13414591ff516e04fcdee8dc051c13fd3db13b673c7a4cb1350e6b2ad9639ad3"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf74d08542c3a9ea97bb8f343d4fcbd4d8f91bba5ec9d5d7f792dbe727f88938"}, + {file = "yarl-1.9.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6e7221580dc1db478464cfeef9b03b95c5852cc22894e418562997df0d074ccc"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:494053246b119b041960ddcd20fd76224149cfea8ed8777b687358727911dd33"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:52a25809fcbecfc63ac9ba0c0fb586f90837f5425edfd1ec9f3372b119585e45"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:e65610c5792870d45d7b68c677681376fcf9cc1c289f23e8e8b39c1485384185"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:1b1bba902cba32cdec51fca038fd53f8beee88b77efc373968d1ed021024cc04"}, + {file = "yarl-1.9.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:662e6016409828ee910f5d9602a2729a8a57d74b163c89a837de3fea050c7582"}, + {file = "yarl-1.9.2-cp37-cp37m-win32.whl", hash = "sha256:f364d3480bffd3aa566e886587eaca7c8c04d74f6e8933f3f2c996b7f09bee1b"}, + {file = "yarl-1.9.2-cp37-cp37m-win_amd64.whl", hash = "sha256:6a5883464143ab3ae9ba68daae8e7c5c95b969462bbe42e2464d60e7e2698368"}, + {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5610f80cf43b6202e2c33ba3ec2ee0a2884f8f423c8f4f62906731d876ef4fac"}, + {file = "yarl-1.9.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b9a4e67ad7b646cd6f0938c7ebfd60e481b7410f574c560e455e938d2da8e0f4"}, + {file = "yarl-1.9.2-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:83fcc480d7549ccebe9415d96d9263e2d4226798c37ebd18c930fce43dfb9574"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fcd436ea16fee7d4207c045b1e340020e58a2597301cfbcfdbe5abd2356c2fb"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:84e0b1599334b1e1478db01b756e55937d4614f8654311eb26012091be109d59"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3458a24e4ea3fd8930e934c129b676c27452e4ebda80fbe47b56d8c6c7a63a9e"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:838162460b3a08987546e881a2bfa573960bb559dfa739e7800ceeec92e64417"}, + {file = "yarl-1.9.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f4e2d08f07a3d7d3e12549052eb5ad3eab1c349c53ac51c209a0e5991bbada78"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:de119f56f3c5f0e2fb4dee508531a32b069a5f2c6e827b272d1e0ff5ac040333"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:149ddea5abf329752ea5051b61bd6c1d979e13fbf122d3a1f9f0c8be6cb6f63c"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:674ca19cbee4a82c9f54e0d1eee28116e63bc6fd1e96c43031d11cbab8b2afd5"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:9b3152f2f5677b997ae6c804b73da05a39daa6a9e85a512e0e6823d81cdad7cc"}, + {file = "yarl-1.9.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:5415d5a4b080dc9612b1b63cba008db84e908b95848369aa1da3686ae27b6d2b"}, + {file = "yarl-1.9.2-cp38-cp38-win32.whl", hash = "sha256:f7a3d8146575e08c29ed1cd287068e6d02f1c7bdff8970db96683b9591b86ee7"}, + {file = "yarl-1.9.2-cp38-cp38-win_amd64.whl", hash = "sha256:63c48f6cef34e6319a74c727376e95626f84ea091f92c0250a98e53e62c77c72"}, + {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:75df5ef94c3fdc393c6b19d80e6ef1ecc9ae2f4263c09cacb178d871c02a5ba9"}, + {file = "yarl-1.9.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:c027a6e96ef77d401d8d5a5c8d6bc478e8042f1e448272e8d9752cb0aff8b5c8"}, + {file = "yarl-1.9.2-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:f3b078dbe227f79be488ffcfc7a9edb3409d018e0952cf13f15fd6512847f3f7"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59723a029760079b7d991a401386390c4be5bfec1e7dd83e25a6a0881859e716"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b03917871bf859a81ccb180c9a2e6c1e04d2f6a51d953e6a5cdd70c93d4e5a2a"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c1012fa63eb6c032f3ce5d2171c267992ae0c00b9e164efe4d73db818465fac3"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a74dcbfe780e62f4b5a062714576f16c2f3493a0394e555ab141bf0d746bb955"}, + {file = "yarl-1.9.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8c56986609b057b4839968ba901944af91b8e92f1725d1a2d77cbac6972b9ed1"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2c315df3293cd521033533d242d15eab26583360b58f7ee5d9565f15fee1bef4"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:b7232f8dfbd225d57340e441d8caf8652a6acd06b389ea2d3222b8bc89cbfca6"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:53338749febd28935d55b41bf0bcc79d634881195a39f6b2f767870b72514caf"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:066c163aec9d3d073dc9ffe5dd3ad05069bcb03fcaab8d221290ba99f9f69ee3"}, + {file = "yarl-1.9.2-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8288d7cd28f8119b07dd49b7230d6b4562f9b61ee9a4ab02221060d21136be80"}, + {file = "yarl-1.9.2-cp39-cp39-win32.whl", hash = "sha256:b124e2a6d223b65ba8768d5706d103280914d61f5cae3afbc50fc3dfcc016623"}, + {file = "yarl-1.9.2-cp39-cp39-win_amd64.whl", hash = "sha256:61016e7d582bc46a5378ffdd02cd0314fb8ba52f40f9cf4d9a5e7dbef88dee18"}, + {file = "yarl-1.9.2.tar.gz", hash = "sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571"}, +] + +[package.dependencies] +idna = ">=2.0" +multidict = ">=4.0" + [[package]] name = "zipp" version = "3.16.2" @@ -3868,4 +4293,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "e050362ab2ff998091752d1595d22f08609e2d5e8bd285b75f9d62ffe71f531c" +content-hash = "d62f81f0d7b74d569d4ca077bef8acacc77e0dc349582d76d65bf97fd8054ce8" diff --git a/pyproject.toml b/pyproject.toml index ea63679a..eb989083 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,7 @@ poetry-plugin-dotenv = "^0.5.1" pyupgrade = "^3.9.0" jupyter = "^1.0.0" contextvars = "^2.4" +openai = "^0.27.9" [tool.poetry.dev-dependencies] bandit = "^1.7.1" From 19c8476d3c5144bd561305776eaacd2d5054feea Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 16:37:01 -0700 Subject: [PATCH 08/10] feat: add cost --- parea/wrapper/openai.py | 69 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 2 deletions(-) diff --git a/parea/wrapper/openai.py b/parea/wrapper/openai.py index 7ac714c2..fb50aba5 100644 --- a/parea/wrapper/openai.py +++ b/parea/wrapper/openai.py @@ -9,11 +9,46 @@ from .wrapper import Wrapper +MODEL_COST_MAPPING: Dict[str, float] = { + "gpt-4": 0.03, + "gpt-4-0314": 0.03, + "gpt-4-0613": 0.03, + "gpt-4-completion": 0.06, + "gpt-4-0314-completion": 0.06, + "gpt-4-0613-completion": 0.06, + "gpt-4-32k": 0.06, + "gpt-4-32k-0314": 0.06, + "gpt-4-32k-0613": 0.06, + "gpt-4-32k-completion": 0.12, + "gpt-4-32k-0314-completion": 0.12, + "gpt-4-32k-0613-completion": 0.12, + "gpt-3.5-turbo": 0.0015, + "gpt-3.5-turbo-0301": 0.0015, + "gpt-3.5-turbo-0613": 0.0015, + "gpt-3.5-turbo-16k": 0.003, + "gpt-3.5-turbo-16k-0613": 0.003, + "gpt-3.5-turbo-completion": 0.002, + "gpt-3.5-turbo-0301-completion": 0.002, + "gpt-3.5-turbo-0613-completion": 0.004, + "gpt-3.5-turbo-16k-completion": 0.004, + "gpt-3.5-turbo-16k-0613-completion": 0.004, + "text-ada-001": 0.0004, + "ada": 0.0004, + "text-babbage-001": 0.0005, + "babbage": 0.0005, + "text-curie-001": 0.002, + "curie": 0.002, + "text-davinci-003": 0.02, + "text-davinci-002": 0.02, + "code-davinci-002": 0.02, +} + + class OpenAIWrapper: original_methods = {"ChatCompletion.create": openai.ChatCompletion.create, "ChatCompletion.acreate": openai.ChatCompletion.acreate} @staticmethod - def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[Any]) -> Dict: + def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], response: Optional[Any]): if response: usage = response["usage"] output = OpenAIWrapper._get_output(response) @@ -21,8 +56,10 @@ def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], respon output = None usage = {} + model = kwargs.get("model", None) + llm_inputs = LLMInputs( - model=kwargs.get("model", None), + model=model, provider="openai", messages=kwargs.get("messages", None), functions=kwargs.get("functions", None), @@ -36,10 +73,19 @@ def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], respon ), ) + model_rate = OpenAIWrapper.get_model_cost(model) + model_completion_rate = OpenAIWrapper.get_model_cost(model, is_completion=True) + completion_cost = model_completion_rate * ( + usage.get("completion_tokens", 0) / 1000 + ) + prompt_cost = model_rate * (usage.get("prompt_tokens", 0) / 1000) + total_cost = sum([prompt_cost, completion_cost]) + trace_data.get()[trace_id].configuration = llm_inputs trace_data.get()[trace_id].input_tokens = usage.get("prompt_tokens", 0) trace_data.get()[trace_id].output_tokens = usage.get("completion_tokens", 0) trace_data.get()[trace_id].total_tokens = usage.get("total_tokens", 0) + trace_data.get()[trace_id].cost = total_cost trace_data.get()[trace_id].output = output @staticmethod @@ -63,3 +109,22 @@ def _format_function_call(response_message) -> str: else: function_args = json.loads(response_message["function_call"]["arguments"]) return f'```{json.dumps({"name": function_name, "arguments": function_args}, indent=4)}```' + + @staticmethod + def get_model_cost(model_name: str, is_completion: bool = False) -> float: + model_name = model_name.lower() + + if model_name.startswith("gpt-4") and is_completion: + model_name += "-completion" + + cost = MODEL_COST_MAPPING.get(model_name, None) + if cost is None: + msg = ( + f"Unknown model: {model_name}. " + f"Please provide a valid OpenAI model name. " + f"Known models are: {', '.join(MODEL_COST_MAPPING.keys())}" + ) + raise ValueError(msg) + + return cost + From 27da1470a42411cae651a94ff39171d389af91c9 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 17:44:59 -0700 Subject: [PATCH 09/10] feat: bump version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index eb989083..b69e3323 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "parea-ai" packages = [{ include = "parea" }] -version = "0.2.0" +version = "0.2.1" description = "Parea python sdk" readme = "README.md" authors = ["joel-parea-ai "] From 6be57f7a91e6681d604079fcfac66598fd82ae54 Mon Sep 17 00:00:00 2001 From: Joschka Braun Date: Mon, 28 Aug 2023 17:46:36 -0700 Subject: [PATCH 10/10] style: fix --- parea/wrapper/openai.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/parea/wrapper/openai.py b/parea/wrapper/openai.py index fb50aba5..d5157923 100644 --- a/parea/wrapper/openai.py +++ b/parea/wrapper/openai.py @@ -8,7 +8,6 @@ from ..utils.trace_utils import trace_data from .wrapper import Wrapper - MODEL_COST_MAPPING: Dict[str, float] = { "gpt-4": 0.03, "gpt-4-0314": 0.03, @@ -75,9 +74,7 @@ def resolver(trace_id: str, _args: Sequence[Any], kwargs: Dict[str, Any], respon model_rate = OpenAIWrapper.get_model_cost(model) model_completion_rate = OpenAIWrapper.get_model_cost(model, is_completion=True) - completion_cost = model_completion_rate * ( - usage.get("completion_tokens", 0) / 1000 - ) + completion_cost = model_completion_rate * (usage.get("completion_tokens", 0) / 1000) prompt_cost = model_rate * (usage.get("prompt_tokens", 0) / 1000) total_cost = sum([prompt_cost, completion_cost]) @@ -119,12 +116,7 @@ def get_model_cost(model_name: str, is_completion: bool = False) -> float: cost = MODEL_COST_MAPPING.get(model_name, None) if cost is None: - msg = ( - f"Unknown model: {model_name}. " - f"Please provide a valid OpenAI model name. " - f"Known models are: {', '.join(MODEL_COST_MAPPING.keys())}" - ) + msg = f"Unknown model: {model_name}. " f"Please provide a valid OpenAI model name. " f"Known models are: {', '.join(MODEL_COST_MAPPING.keys())}" raise ValueError(msg) return cost -