diff --git a/libs/cohere/langchain_cohere/__init__.py b/libs/cohere/langchain_cohere/__init__.py index 14a475e..00ceb6c 100644 --- a/libs/cohere/langchain_cohere/__init__.py +++ b/libs/cohere/langchain_cohere/__init__.py @@ -2,7 +2,6 @@ from langchain_cohere.chat_models import ChatCohere from langchain_cohere.cohere_agent import create_cohere_tools_agent from langchain_cohere.common import CohereCitation -from langchain_cohere.csv_agent.agent import create_csv_agent from langchain_cohere.embeddings import CohereEmbeddings from langchain_cohere.rag_retrievers import CohereRagRetriever from langchain_cohere.react_multi_hop.agent import create_cohere_react_agent @@ -17,7 +16,6 @@ "CohereRerank", "create_cohere_tools_agent", "create_cohere_react_agent", - "create_csv_agent", "create_sql_agent", "load_summarize_chain", ] diff --git a/libs/cohere/langchain_cohere/csv_agent/__init__.py b/libs/cohere/langchain_cohere/csv_agent/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/libs/cohere/langchain_cohere/csv_agent/agent.py b/libs/cohere/langchain_cohere/csv_agent/agent.py deleted file mode 100644 index ea33901..0000000 --- a/libs/cohere/langchain_cohere/csv_agent/agent.py +++ /dev/null @@ -1,203 +0,0 @@ -from datetime import datetime -from io import IOBase -from typing import List, Optional, Union - -from langchain.agents import AgentExecutor, create_tool_calling_agent -from langchain_core._api.deprecation import deprecated -from langchain_core.language_models import BaseLanguageModel -from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage -from langchain_core.prompts import ( - ChatPromptTemplate, - MessagesPlaceholder, -) -from langchain_core.prompts.chat import ( - BaseMessagePromptTemplate, - HumanMessagePromptTemplate, -) -from langchain_core.tools import BaseTool - -from langchain_cohere.chat_models import ChatCohere -from langchain_cohere.csv_agent.prompts import ( - CSV_PREAMBLE, -) - -# lets define a set of tools for the Agent -from langchain_cohere.csv_agent.tools import ( - get_file_peek_tool, - get_file_read_tool, - get_python_tool, -) - - -def create_prompt( - system_message: Optional[BaseMessage] = SystemMessage( - content="You are a helpful AI assistant." - ), - extra_prompt_messages: Optional[List[BaseMessagePromptTemplate]] = None, -) -> ChatPromptTemplate: - """Create prompt for this agent. - - Args: - system_message: Message to use as the system message that will be the - first in the prompt. - extra_prompt_messages: Prompt messages that will be placed between the - system message and the new human input. - - Returns: - A prompt template to pass into this agent. - """ - _prompts = extra_prompt_messages or [] - messages: List[Union[BaseMessagePromptTemplate, BaseMessage]] - if system_message: - messages = [system_message] - else: - messages = [] - - messages.extend( - [ - *_prompts, - HumanMessagePromptTemplate.from_template("{input}"), - MessagesPlaceholder(variable_name="agent_scratchpad"), - ] - ) - return ChatPromptTemplate(messages=messages) - - -def _get_csv_head_str(path: str, number_of_head_rows: int) -> str: - with open(path, "r") as file: - lines = [] - for _ in range(number_of_head_rows): - lines.append(file.readline().strip("\n")) - # validate that the head contents are well formatted csv - - return " ".join(lines) - - -def _get_prompt( - path: Union[str, List[str]], number_of_head_rows: int -) -> ChatPromptTemplate: - if isinstance(path, str): - lines = _get_csv_head_str(path, number_of_head_rows) - prompt_message = f"The user uploaded the following attachments:\nFilename: {path}\nWord Count: {count_words_in_file(path)}\nPreview: {lines}" # noqa: E501 - - elif isinstance(path, list): - prompt_messages = [] - for file_path in path: - lines = _get_csv_head_str(file_path, number_of_head_rows) - prompt_messages.append( - f"The user uploaded the following attachments:\nFilename: {file_path}\nWord Count: {count_words_in_file(file_path)}\nPreview: {lines}" # noqa: E501 - ) - prompt_message = " ".join(prompt_messages) - - prompt = create_prompt(system_message=HumanMessage(prompt_message)) - return prompt - - -def count_words_in_file(file_path: str) -> int: - try: - with open(file_path, "r") as file: - content = file.readlines() - words = [len(sentence.split()) for sentence in content] - return sum(words) - except FileNotFoundError: - print("File not found.") - return 0 - except Exception as e: - print("An error occurred:", str(e)) - return 0 - - -@deprecated( - since="0.3.5", - removal="0.4.0", - message="""The create_csv_agent abstraction has been deprecated. - "Please refer to https://docs.cohere.com/page/migrate-csv-agent - for an alternative implementation.""", -) -def create_csv_agent( - llm: BaseLanguageModel, - path: Union[str, List[str]], - extra_tools: List[BaseTool] = [], - pandas_kwargs: Optional[dict] = None, - prompt: Optional[ChatPromptTemplate] = None, - number_of_head_rows: int = 5, - verbose: bool = True, - return_intermediate_steps: bool = True, - temp_path_dir: Optional[str] = None, - temp_path_prefix: Optional[str] = "langchain", - temp_path_suffix: Optional[str] = "csv_agent", -) -> AgentExecutor: - """Create csv agent with the specified language model. - - Args: - llm: Language model to use for the agent. - path: A string path, or a list of string paths - that can be read in as pandas DataFrames with pd.read_csv(). - number_of_head_rows: Number of rows to display in the prompt for sample data - include_df_in_prompt: Display the DataFrame sample values in the prompt. - pandas_kwargs: Named arguments to pass to pd.read_csv(). - prefix: Prompt prefix string. - suffix: Prompt suffix string. - prompt: Prompt to use for the agent. This takes precedence over the other prompt arguments, such as suffix and prefix. - temp_path_dir: Temporary directory to store the csv files in for the python repl. - delete_temp_path: Whether to delete the temporary directory after the agent is done. This only works if temp_path_dir is not provided. - - Returns: - An AgentExecutor with the specified agent_type agent and access to - a PythonREPL and any user-provided extra_tools. - - Example: - .. code-block:: python - - from langchain_cohere import ChatCohere, create_csv_agent - - llm = ChatCohere(model="command-r-plus", temperature=0) - agent_executor = create_csv_agent( - llm, - "titanic.csv" - ) - resp = agent_executor.invoke({"input":"How many people were on the titanic?"}) - print(resp.get("output")) - """ # noqa: E501 - try: - import pandas as pd - except ImportError: - raise ImportError( - "pandas package not found, please install with `pip install pandas`." - ) - - _kwargs = pandas_kwargs or {} - if isinstance(path, (str)): - df = pd.read_csv(path, **_kwargs) - - elif isinstance(path, list): - df = [] - for item in path: - if not isinstance(item, (str, IOBase)): - raise ValueError(f"Expected str or file-like object, got {type(path)}") - df.append(pd.read_csv(item, **_kwargs)) - else: - raise ValueError(f"Expected str, list, or file-like object, got {type(path)}") - - if not prompt: - prompt = _get_prompt(path, number_of_head_rows) - - final_tools = [ - get_file_read_tool(), - get_file_peek_tool(), - get_python_tool(), - ] + extra_tools - if "preamble" in llm.__dict__ and not llm.__dict__.get("preamble"): - llm = ChatCohere(**llm.__dict__) - llm.preamble = CSV_PREAMBLE.format( - current_date=datetime.now().strftime("%A, %B %d, %Y %H:%M:%S") - ) - - agent = create_tool_calling_agent(llm=llm, tools=final_tools, prompt=prompt) - agent_executor = AgentExecutor( - agent=agent, - tools=final_tools, - verbose=verbose, - return_intermediate_steps=return_intermediate_steps, - ) - return agent_executor diff --git a/libs/cohere/langchain_cohere/csv_agent/prompts.py b/libs/cohere/langchain_cohere/csv_agent/prompts.py deleted file mode 100644 index 328a9c9..0000000 --- a/libs/cohere/langchain_cohere/csv_agent/prompts.py +++ /dev/null @@ -1,34 +0,0 @@ -FUNCTIONS_WITH_DF = """ -This is the result of `print(df.head())`: -{df_head} - -Do note that the above df isn't the complete df. It is only the first {number_of_head_rows} rows of the df. -Use this as a sample to understand the structure of the df. However, donot use this to make any calculations directly! - -The complete path for the csv files are for the corresponding dataframe is: -{csv_path} -""" # noqa E501 - -FUNCTIONS_WITH_MULTI_DF = """ -This is the result of `print(df.head())` for each dataframe: -{dfs_head} - -Do note that the above dfs aren't the complete df. It is only the first {number_of_head_rows} rows of the df. -Use this as a sample to understand the structure of the df. However, donot use this to make any calculations directly! - -The complete path for the csv files are for the corresponding dataframes are: -{csv_paths} -""" # noqa E501 - -PREFIX_FUNCTIONS = """ -You are working with a pandas dataframe in Python. The name of the dataframe is `df`.""" # noqa E501 - -MULTI_DF_PREFIX_FUNCTIONS = """ -You are working with {num_dfs} pandas dataframes in Python named df1, df2, etc.""" # noqa E501 - -CSV_PREAMBLE = """## Task And Context -You use your advanced complex reasoning capabilities to help people by answering their questions and other requests interactively. You will be asked a very wide array of requests on all kinds of topics. You will be equipped with a wide range of search engines or similar tools to help you, which you use to research your answer. You may need to use multiple tools in parallel or sequentially to complete your task. You should focus on serving the user's needs as best you can, which will be wide-ranging. The current date is {current_date} - -## Style Guide -Unless the user asks for a different style of answer, you should answer in full sentences, using proper grammar and spelling -""" # noqa E501 diff --git a/libs/cohere/langchain_cohere/csv_agent/tools.py b/libs/cohere/langchain_cohere/csv_agent/tools.py deleted file mode 100644 index 975e441..0000000 --- a/libs/cohere/langchain_cohere/csv_agent/tools.py +++ /dev/null @@ -1,84 +0,0 @@ -"""This module contains the tools that are used in the experiments.""" - -import pandas as pd -from langchain_core.tools import Tool -from langchain_experimental.tools.python.tool import PythonAstREPLTool -from pydantic import BaseModel, Field - - -def get_file_peek_tool() -> Tool: - def file_peek(filename: str, num_rows: int = 5) -> str: - """Returns the first textual contents of an uploaded file - - Args: - table_path: the table path - num_rows: the number of rows of the table to preview. - """ # noqa E501 - if ".csv" in filename: - return pd.read_csv(filename).head(num_rows).to_markdown() - else: - return "the table_path was not recognised" - - class file_peek_inputs(BaseModel): - filename: str = Field( - description="The name of the attached file to show a peek preview." - ) - - file_peek_tool = Tool( - name="file_peek", - description="The name of the attached file to show a peek preview.", # noqa E501 - func=file_peek, - args_schema=file_peek_inputs, - ) - - return file_peek_tool - - -def get_file_read_tool() -> Tool: - def file_read(filename: str) -> str: - """Returns the textual contents of an uploaded file, broken up in text chunks - - Args: - filename (str): The name of the attached file to read. - """ # noqa E501 - if ".csv" in filename: - return pd.read_csv(filename).to_markdown() - else: - return "the table_path was not recognised" - - class file_read_inputs(BaseModel): - filename: str = Field(description="The name of the attached file to read.") - - file_read_tool = Tool( - name="file_read", - description="Returns the textual contents of an uploaded file, broken up in text chunks", # noqa E501 - func=file_read, - args_schema=file_read_inputs, - ) - - return file_read_tool - - -def get_python_tool() -> Tool: - """Returns a tool that will execute python code and return the output.""" - - def python_interpreter(code: str) -> str: - """A function that will return the output of the python code. - - Args: - code: the python code to run. - """ - return python_repl.run(code) - - python_repl = PythonAstREPLTool() - python_tool = Tool( - name="python_interpreter", - description="Executes python code and returns the result. The code runs in a static sandbox without interactive mode, so print output or save output to a file.", # noqa E501 - func=python_interpreter, - ) - - class PythonToolInput(BaseModel): - code: str = Field(description="Python code to execute.") - - python_tool.args_schema = PythonToolInput - return python_tool diff --git a/libs/cohere/poetry.lock b/libs/cohere/poetry.lock index e8a0940..1691f4b 100644 --- a/libs/cohere/poetry.lock +++ b/libs/cohere/poetry.lock @@ -197,6 +197,85 @@ files = [ {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, ] +[[package]] +name = "cffi" +version = "1.17.1" +description = "Foreign Function Interface for Python calling C code." +optional = false +python-versions = ">=3.8" +files = [ + {file = "cffi-1.17.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:df8b1c11f177bc2313ec4b2d46baec87a5f3e71fc8b45dab2ee7cae86d9aba14"}, + {file = "cffi-1.17.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8f2cdc858323644ab277e9bb925ad72ae0e67f69e804f4898c070998d50b1a67"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:edae79245293e15384b51f88b00613ba9f7198016a5948b5dddf4917d4d26382"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:45398b671ac6d70e67da8e4224a065cec6a93541bb7aebe1b198a61b58c7b702"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:ad9413ccdeda48c5afdae7e4fa2192157e991ff761e7ab8fdd8926f40b160cc3"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:5da5719280082ac6bd9aa7becb3938dc9f9cbd57fac7d2871717b1feb0902ab6"}, + {file = "cffi-1.17.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2bb1a08b8008b281856e5971307cc386a8e9c5b625ac297e853d36da6efe9c17"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:045d61c734659cc045141be4bae381a41d89b741f795af1dd018bfb532fd0df8"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:6883e737d7d9e4899a8a695e00ec36bd4e5e4f18fabe0aca0efe0a4b44cdb13e"}, + {file = "cffi-1.17.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6b8b4a92e1c65048ff98cfe1f735ef8f1ceb72e3d5f0c25fdb12087a23da22be"}, + {file = "cffi-1.17.1-cp310-cp310-win32.whl", hash = "sha256:c9c3d058ebabb74db66e431095118094d06abf53284d9c81f27300d0e0d8bc7c"}, + {file = "cffi-1.17.1-cp310-cp310-win_amd64.whl", hash = "sha256:0f048dcf80db46f0098ccac01132761580d28e28bc0f78ae0d58048063317e15"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:a45e3c6913c5b87b3ff120dcdc03f6131fa0065027d0ed7ee6190736a74cd401"}, + {file = "cffi-1.17.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:30c5e0cb5ae493c04c8b42916e52ca38079f1b235c2f8ae5f4527b963c401caf"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f75c7ab1f9e4aca5414ed4d8e5c0e303a34f4421f8a0d47a4d019ceff0ab6af4"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a1ed2dd2972641495a3ec98445e09766f077aee98a1c896dcb4ad0d303628e41"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:46bf43160c1a35f7ec506d254e5c890f3c03648a4dbac12d624e4490a7046cd1"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a24ed04c8ffd54b0729c07cee15a81d964e6fee0e3d4d342a27b020d22959dc6"}, + {file = "cffi-1.17.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:610faea79c43e44c71e1ec53a554553fa22321b65fae24889706c0a84d4ad86d"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a9b15d491f3ad5d692e11f6b71f7857e7835eb677955c00cc0aefcd0669adaf6"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:de2ea4b5833625383e464549fec1bc395c1bdeeb5f25c4a3a82b5a8c756ec22f"}, + {file = "cffi-1.17.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:fc48c783f9c87e60831201f2cce7f3b2e4846bf4d8728eabe54d60700b318a0b"}, + {file = "cffi-1.17.1-cp311-cp311-win32.whl", hash = "sha256:85a950a4ac9c359340d5963966e3e0a94a676bd6245a4b55bc43949eee26a655"}, + {file = "cffi-1.17.1-cp311-cp311-win_amd64.whl", hash = "sha256:caaf0640ef5f5517f49bc275eca1406b0ffa6aa184892812030f04c2abf589a0"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:805b4371bf7197c329fcb3ead37e710d1bca9da5d583f5073b799d5c5bd1eee4"}, + {file = "cffi-1.17.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:733e99bc2df47476e3848417c5a4540522f234dfd4ef3ab7fafdf555b082ec0c"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1257bdabf294dceb59f5e70c64a3e2f462c30c7ad68092d01bbbfb1c16b1ba36"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:da95af8214998d77a98cc14e3a3bd00aa191526343078b530ceb0bd710fb48a5"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d63afe322132c194cf832bfec0dc69a99fb9bb6bbd550f161a49e9e855cc78ff"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f79fc4fc25f1c8698ff97788206bb3c2598949bfe0fef03d299eb1b5356ada99"}, + {file = "cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b62ce867176a75d03a665bad002af8e6d54644fad99a3c70905c543130e39d93"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:386c8bf53c502fff58903061338ce4f4950cbdcb23e2902d86c0f722b786bbe3"}, + {file = "cffi-1.17.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:4ceb10419a9adf4460ea14cfd6bc43d08701f0835e979bf821052f1805850fe8"}, + {file = "cffi-1.17.1-cp312-cp312-win32.whl", hash = "sha256:a08d7e755f8ed21095a310a693525137cfe756ce62d066e53f502a83dc550f65"}, + {file = "cffi-1.17.1-cp312-cp312-win_amd64.whl", hash = "sha256:51392eae71afec0d0c8fb1a53b204dbb3bcabcb3c9b807eedf3e1e6ccf2de903"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f3a2b4222ce6b60e2e8b337bb9596923045681d71e5a082783484d845390938e"}, + {file = "cffi-1.17.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:0984a4925a435b1da406122d4d7968dd861c1385afe3b45ba82b750f229811e2"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d01b12eeeb4427d3110de311e1774046ad344f5b1a7403101878976ecd7a10f3"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:706510fe141c86a69c8ddc029c7910003a17353970cff3b904ff0686a5927683"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:de55b766c7aa2e2a3092c51e0483d700341182f08e67c63630d5b6f200bb28e5"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c59d6e989d07460165cc5ad3c61f9fd8f1b4796eacbd81cee78957842b834af4"}, + {file = "cffi-1.17.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dd398dbc6773384a17fe0d3e7eeb8d1a21c2200473ee6806bb5e6a8e62bb73dd"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:3edc8d958eb099c634dace3c7e16560ae474aa3803a5df240542b305d14e14ed"}, + {file = "cffi-1.17.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:72e72408cad3d5419375fc87d289076ee319835bdfa2caad331e377589aebba9"}, + {file = "cffi-1.17.1-cp313-cp313-win32.whl", hash = "sha256:e03eab0a8677fa80d646b5ddece1cbeaf556c313dcfac435ba11f107ba117b5d"}, + {file = "cffi-1.17.1-cp313-cp313-win_amd64.whl", hash = "sha256:f6a16c31041f09ead72d69f583767292f750d24913dadacf5756b966aacb3f1a"}, + {file = "cffi-1.17.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:636062ea65bd0195bc012fea9321aca499c0504409f413dc88af450b57ffd03b"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c7eac2ef9b63c79431bc4b25f1cd649d7f061a28808cbc6c47b534bd789ef964"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e221cf152cff04059d011ee126477f0d9588303eb57e88923578ace7baad17f9"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:31000ec67d4221a71bd3f67df918b1f88f676f1c3b535a7eb473255fdc0b83fc"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f17be4345073b0a7b8ea599688f692ac3ef23ce28e5df79c04de519dbc4912c"}, + {file = "cffi-1.17.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0e2b1fac190ae3ebfe37b979cc1ce69c81f4e4fe5746bb401dca63a9062cdaf1"}, + {file = "cffi-1.17.1-cp38-cp38-win32.whl", hash = "sha256:7596d6620d3fa590f677e9ee430df2958d2d6d6de2feeae5b20e82c00b76fbf8"}, + {file = "cffi-1.17.1-cp38-cp38-win_amd64.whl", hash = "sha256:78122be759c3f8a014ce010908ae03364d00a1f81ab5c7f4a7a5120607ea56e1"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b2ab587605f4ba0bf81dc0cb08a41bd1c0a5906bd59243d56bad7668a6fc6c16"}, + {file = "cffi-1.17.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:28b16024becceed8c6dfbc75629e27788d8a3f9030691a1dbf9821a128b22c36"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1d599671f396c4723d016dbddb72fe8e0397082b0a77a4fab8028923bec050e8"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ca74b8dbe6e8e8263c0ffd60277de77dcee6c837a3d0881d8c1ead7268c9e576"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f7f5baafcc48261359e14bcd6d9bff6d4b28d9103847c9e136694cb0501aef87"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:98e3969bcff97cae1b2def8ba499ea3d6f31ddfdb7635374834cf89a1a08ecf0"}, + {file = "cffi-1.17.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cdf5ce3acdfd1661132f2a9c19cac174758dc2352bfe37d98aa7512c6b7178b3"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:9755e4345d1ec879e3849e62222a18c7174d65a6a92d5b346b1863912168b595"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f1e22e8c4419538cb197e4dd60acc919d7696e5ef98ee4da4e01d3f8cfa4cc5a"}, + {file = "cffi-1.17.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:c03e868a0b3bc35839ba98e74211ed2b05d2119be4e8a0f224fba9384f1fe02e"}, + {file = "cffi-1.17.1-cp39-cp39-win32.whl", hash = "sha256:e31ae45bc2e29f6b2abd0de1cc3b9d5205aa847cafaecb8af1476a609a2f6eb7"}, + {file = "cffi-1.17.1-cp39-cp39-win_amd64.whl", hash = "sha256:d016c76bdd850f3c626af19b0542c9677ba156e4ee4fccfdd7848803533ef662"}, + {file = "cffi-1.17.1.tar.gz", hash = "sha256:1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"}, +] + +[package.dependencies] +pycparser = "*" + [[package]] name = "charset-normalizer" version = "3.4.1" @@ -300,13 +379,13 @@ files = [ [[package]] name = "codespell" -version = "2.3.0" -description = "Codespell" +version = "2.4.0" +description = "Fix common misspellings in text files" optional = false python-versions = ">=3.8" files = [ - {file = "codespell-2.3.0-py3-none-any.whl", hash = "sha256:a9c7cef2501c9cfede2110fd6d4e5e62296920efe9abfb84648df866e47f58d1"}, - {file = "codespell-2.3.0.tar.gz", hash = "sha256:360c7d10f75e65f67bad720af7007e1060a5d395670ec11a7ed1fed9dd17471f"}, + {file = "codespell-2.4.0-py3-none-any.whl", hash = "sha256:b4c5b779f747dd481587aeecb5773301183f52b94b96ed51a28126d0482eec1d"}, + {file = "codespell-2.4.0.tar.gz", hash = "sha256:587d45b14707fb8ce51339ba4cce50ae0e98ce228ef61f3c5e160e34f681be58"}, ] [package.extras] @@ -425,18 +504,18 @@ zstandard = ["zstandard"] [[package]] name = "filelock" -version = "3.16.1" +version = "3.17.0" description = "A platform independent file lock." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "filelock-3.16.1-py3-none-any.whl", hash = "sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0"}, - {file = "filelock-3.16.1.tar.gz", hash = "sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435"}, + {file = "filelock-3.17.0-py3-none-any.whl", hash = "sha256:533dc2f7ba78dc2f0f531fc6c4940addf7b70a481e269a5a3b93be94ffbe8338"}, + {file = "filelock-3.17.0.tar.gz", hash = "sha256:ee4e77401ef576ebb38cd7f13b9b28893194acc20a8e68e18730ba9c0e54660e"}, ] [package.extras] -docs = ["furo (>=2024.8.6)", "sphinx (>=8.0.2)", "sphinx-autodoc-typehints (>=2.4.1)"] -testing = ["covdefaults (>=2.3)", "coverage (>=7.6.1)", "diff-cover (>=9.2)", "pytest (>=8.3.3)", "pytest-asyncio (>=0.24)", "pytest-cov (>=5)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.26.4)"] +docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] +testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] typing = ["typing-extensions (>=4.12.2)"] [[package]] @@ -909,21 +988,6 @@ PyYAML = ">=5.3" tenacity = ">=8.1.0,<8.4.0 || >8.4.0,<10.0.0" typing-extensions = ">=4.7" -[[package]] -name = "langchain-experimental" -version = "0.3.4" -description = "Building applications with LLMs through composability" -optional = false -python-versions = "<4.0,>=3.9" -files = [ - {file = "langchain_experimental-0.3.4-py3-none-any.whl", hash = "sha256:2e587306aea36b60fa5e5fc05dc7281bee9f60a806f0bf9d30916e0ee096af80"}, - {file = "langchain_experimental-0.3.4.tar.gz", hash = "sha256:937c4259ee4a639c618d19acf0e2c5c2898ef127050346edc5655259aa281a21"}, -] - -[package.dependencies] -langchain-community = ">=0.3.0,<0.4.0" -langchain-core = ">=0.3.28,<0.4.0" - [[package]] name = "langchain-tests" version = "0.3.1" @@ -957,13 +1021,13 @@ langchain-core = ">=0.3.29,<0.4.0" [[package]] name = "langgraph" -version = "0.2.65" +version = "0.2.66" description = "Building stateful, multi-actor applications with LLMs" optional = false python-versions = "<4.0,>=3.9.0" files = [ - {file = "langgraph-0.2.65-py3-none-any.whl", hash = "sha256:f4f50447b355828842ad22ae2ad59f4081049d4cf810011c1038f322c8626561"}, - {file = "langgraph-0.2.65.tar.gz", hash = "sha256:f600e90e3bd3850d687e9c0c7ef497883ce5111802733ce6dae1820ef9aaa592"}, + {file = "langgraph-0.2.66-py3-none-any.whl", hash = "sha256:3b839e63b106161a8b4e0914a5041ca6ce8449623506f15b8b575d49e4f35ee7"}, + {file = "langgraph-0.2.66.tar.gz", hash = "sha256:97d3b36cfeab188c5e67019d959bed2f2d5d627b1548b3588709aa9759d2b5e7"}, ] [package.dependencies] @@ -1003,13 +1067,13 @@ orjson = ">=3.10.1" [[package]] name = "langsmith" -version = "0.2.11" +version = "0.3.0" description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform." optional = false python-versions = "<4.0,>=3.9" files = [ - {file = "langsmith-0.2.11-py3-none-any.whl", hash = "sha256:084cf66a7f093c25e6b30fb4005008ec5fa9843110e2f0b265ce133c6a0225e6"}, - {file = "langsmith-0.2.11.tar.gz", hash = "sha256:edf070349dbfc63dc4fc30e22533a11d77768e99ef269399b221c48fee25c737"}, + {file = "langsmith-0.3.0-py3-none-any.whl", hash = "sha256:dff7d4fc507acfcb790c77e2d58b4c687101daf306195b08bac66c56a0a82d5c"}, + {file = "langsmith-0.3.0.tar.gz", hash = "sha256:601addc2cc6bddd5aee32bf94bd6729c94b5e50da72a091f6285fca1a9cf18ef"}, ] [package.dependencies] @@ -1021,10 +1085,11 @@ pydantic = [ ] requests = ">=2,<3" requests-toolbelt = ">=1.0.0,<2.0.0" +zstandard = ">=0.23.0,<0.24.0" [package.extras] -compression = ["zstandard (>=0.23.0,<0.24.0)"] langsmith-pyo3 = ["langsmith-pyo3 (>=0.1.0rc2,<0.2.0)"] +pytest = ["pytest (>=7.0.0)", "rich (>=13.9.4,<14.0.0)"] [[package]] name = "marshmallow" @@ -1491,92 +1556,6 @@ files = [ {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] -[[package]] -name = "pandas" -version = "2.2.3" -description = "Powerful data structures for data analysis, time series, and statistics" -optional = false -python-versions = ">=3.9" -files = [ - {file = "pandas-2.2.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1948ddde24197a0f7add2bdc4ca83bf2b1ef84a1bc8ccffd95eda17fd836ecb5"}, - {file = "pandas-2.2.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:381175499d3802cde0eabbaf6324cce0c4f5d52ca6f8c377c29ad442f50f6348"}, - {file = "pandas-2.2.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d9c45366def9a3dd85a6454c0e7908f2b3b8e9c138f5dc38fed7ce720d8453ed"}, - {file = "pandas-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86976a1c5b25ae3f8ccae3a5306e443569ee3c3faf444dfd0f41cda24667ad57"}, - {file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:b8661b0238a69d7aafe156b7fa86c44b881387509653fdf857bebc5e4008ad42"}, - {file = "pandas-2.2.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:37e0aced3e8f539eccf2e099f65cdb9c8aa85109b0be6e93e2baff94264bdc6f"}, - {file = "pandas-2.2.3-cp310-cp310-win_amd64.whl", hash = "sha256:56534ce0746a58afaf7942ba4863e0ef81c9c50d3f0ae93e9497d6a41a057645"}, - {file = "pandas-2.2.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:66108071e1b935240e74525006034333f98bcdb87ea116de573a6a0dccb6c039"}, - {file = "pandas-2.2.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7c2875855b0ff77b2a64a0365e24455d9990730d6431b9e0ee18ad8acee13dbd"}, - {file = "pandas-2.2.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:cd8d0c3be0515c12fed0bdbae072551c8b54b7192c7b1fda0ba56059a0179698"}, - {file = "pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c124333816c3a9b03fbeef3a9f230ba9a737e9e5bb4060aa2107a86cc0a497fc"}, - {file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:63cc132e40a2e084cf01adf0775b15ac515ba905d7dcca47e9a251819c575ef3"}, - {file = "pandas-2.2.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:29401dbfa9ad77319367d36940cd8a0b3a11aba16063e39632d98b0e931ddf32"}, - {file = "pandas-2.2.3-cp311-cp311-win_amd64.whl", hash = "sha256:3fc6873a41186404dad67245896a6e440baacc92f5b716ccd1bc9ed2995ab2c5"}, - {file = "pandas-2.2.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b1d432e8d08679a40e2a6d8b2f9770a5c21793a6f9f47fdd52c5ce1948a5a8a9"}, - {file = "pandas-2.2.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a5a1595fe639f5988ba6a8e5bc9649af3baf26df3998a0abe56c02609392e0a4"}, - {file = "pandas-2.2.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5de54125a92bb4d1c051c0659e6fcb75256bf799a732a87184e5ea503965bce3"}, - {file = "pandas-2.2.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fffb8ae78d8af97f849404f21411c95062db1496aeb3e56f146f0355c9989319"}, - {file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6dfcb5ee8d4d50c06a51c2fffa6cff6272098ad6540aed1a76d15fb9318194d8"}, - {file = "pandas-2.2.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:062309c1b9ea12a50e8ce661145c6aab431b1e99530d3cd60640e255778bd43a"}, - {file = "pandas-2.2.3-cp312-cp312-win_amd64.whl", hash = "sha256:59ef3764d0fe818125a5097d2ae867ca3fa64df032331b7e0917cf5d7bf66b13"}, - {file = "pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015"}, - {file = "pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28"}, - {file = "pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0"}, - {file = "pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24"}, - {file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659"}, - {file = "pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb"}, - {file = "pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d"}, - {file = "pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468"}, - {file = "pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18"}, - {file = "pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2"}, - {file = "pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4"}, - {file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d"}, - {file = "pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a"}, - {file = "pandas-2.2.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:bc6b93f9b966093cb0fd62ff1a7e4c09e6d546ad7c1de191767baffc57628f39"}, - {file = "pandas-2.2.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5dbca4c1acd72e8eeef4753eeca07de9b1db4f398669d5994086f788a5d7cc30"}, - {file = "pandas-2.2.3-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8cd6d7cc958a3910f934ea8dbdf17b2364827bb4dafc38ce6eef6bb3d65ff09c"}, - {file = "pandas-2.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:99df71520d25fade9db7c1076ac94eb994f4d2673ef2aa2e86ee039b6746d20c"}, - {file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:31d0ced62d4ea3e231a9f228366919a5ea0b07440d9d4dac345376fd8e1477ea"}, - {file = "pandas-2.2.3-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:7eee9e7cea6adf3e3d24e304ac6b8300646e2a5d1cd3a3c2abed9101b0846761"}, - {file = "pandas-2.2.3-cp39-cp39-win_amd64.whl", hash = "sha256:4850ba03528b6dd51d6c5d273c46f183f39a9baf3f0143e566b89450965b105e"}, - {file = "pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667"}, -] - -[package.dependencies] -numpy = [ - {version = ">=1.22.4", markers = "python_version < \"3.11\""}, - {version = ">=1.23.2", markers = "python_version == \"3.11\""}, - {version = ">=1.26.0", markers = "python_version >= \"3.12\""}, -] -python-dateutil = ">=2.8.2" -pytz = ">=2020.1" -tzdata = ">=2022.7" - -[package.extras] -all = ["PyQt5 (>=5.15.9)", "SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)", "beautifulsoup4 (>=4.11.2)", "bottleneck (>=1.3.6)", "dataframe-api-compat (>=0.1.7)", "fastparquet (>=2022.12.0)", "fsspec (>=2022.11.0)", "gcsfs (>=2022.11.0)", "html5lib (>=1.1)", "hypothesis (>=6.46.1)", "jinja2 (>=3.1.2)", "lxml (>=4.9.2)", "matplotlib (>=3.6.3)", "numba (>=0.56.4)", "numexpr (>=2.8.4)", "odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "pandas-gbq (>=0.19.0)", "psycopg2 (>=2.9.6)", "pyarrow (>=10.0.1)", "pymysql (>=1.0.2)", "pyreadstat (>=1.2.0)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "qtpy (>=2.3.0)", "s3fs (>=2022.11.0)", "scipy (>=1.10.0)", "tables (>=3.8.0)", "tabulate (>=0.9.0)", "xarray (>=2022.12.0)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)", "zstandard (>=0.19.0)"] -aws = ["s3fs (>=2022.11.0)"] -clipboard = ["PyQt5 (>=5.15.9)", "qtpy (>=2.3.0)"] -compression = ["zstandard (>=0.19.0)"] -computation = ["scipy (>=1.10.0)", "xarray (>=2022.12.0)"] -consortium-standard = ["dataframe-api-compat (>=0.1.7)"] -excel = ["odfpy (>=1.4.1)", "openpyxl (>=3.1.0)", "python-calamine (>=0.1.7)", "pyxlsb (>=1.0.10)", "xlrd (>=2.0.1)", "xlsxwriter (>=3.0.5)"] -feather = ["pyarrow (>=10.0.1)"] -fss = ["fsspec (>=2022.11.0)"] -gcp = ["gcsfs (>=2022.11.0)", "pandas-gbq (>=0.19.0)"] -hdf5 = ["tables (>=3.8.0)"] -html = ["beautifulsoup4 (>=4.11.2)", "html5lib (>=1.1)", "lxml (>=4.9.2)"] -mysql = ["SQLAlchemy (>=2.0.0)", "pymysql (>=1.0.2)"] -output-formatting = ["jinja2 (>=3.1.2)", "tabulate (>=0.9.0)"] -parquet = ["pyarrow (>=10.0.1)"] -performance = ["bottleneck (>=1.3.6)", "numba (>=0.56.4)", "numexpr (>=2.8.4)"] -plot = ["matplotlib (>=3.6.3)"] -postgresql = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "psycopg2 (>=2.9.6)"] -pyarrow = ["pyarrow (>=10.0.1)"] -spss = ["pyreadstat (>=1.2.0)"] -sql-other = ["SQLAlchemy (>=2.0.0)", "adbc-driver-postgresql (>=0.8.0)", "adbc-driver-sqlite (>=0.8.0)"] -test = ["hypothesis (>=6.46.1)", "pytest (>=7.3.2)", "pytest-xdist (>=2.2.0)"] -xml = ["lxml (>=4.9.2)"] - [[package]] name = "pluggy" version = "1.5.0" @@ -1683,6 +1662,17 @@ files = [ {file = "propcache-0.2.1.tar.gz", hash = "sha256:3f77ce728b19cb537714499928fe800c3dda29e8d9428778fc7c186da4c09a64"}, ] +[[package]] +name = "pycparser" +version = "2.22" +description = "C parser in Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pycparser-2.22-py3-none-any.whl", hash = "sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc"}, + {file = "pycparser-2.22.tar.gz", hash = "sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"}, +] + [[package]] name = "pydantic" version = "2.10.5" @@ -1950,17 +1940,6 @@ files = [ [package.extras] cli = ["click (>=5.0)"] -[[package]] -name = "pytz" -version = "2024.2" -description = "World timezone definitions, modern and historical" -optional = false -python-versions = "*" -files = [ - {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, - {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, -] - [[package]] name = "pyyaml" version = "6.0.2" @@ -2215,20 +2194,6 @@ files = [ [package.dependencies] pytest = ">=7.0.0,<9.0.0" -[[package]] -name = "tabulate" -version = "0.9.0" -description = "Pretty-print tabular data" -optional = false -python-versions = ">=3.7" -files = [ - {file = "tabulate-0.9.0-py3-none-any.whl", hash = "sha256:024ca478df22e9340661486f85298cff5f6dcdba14f3813e8830015b9ed1948f"}, - {file = "tabulate-0.9.0.tar.gz", hash = "sha256:0095b12bf5966de529c0feb1fa08671671b3368eec77d7ef7ab114be2c068b3c"}, -] - -[package.extras] -widechars = ["wcwidth"] - [[package]] name = "tenacity" version = "9.0.0" @@ -2403,17 +2368,6 @@ files = [ mypy-extensions = ">=0.3.0" typing-extensions = ">=3.7.4" -[[package]] -name = "tzdata" -version = "2024.2" -description = "Provider of IANA time zone data" -optional = false -python-versions = ">=2" -files = [ - {file = "tzdata-2024.2-py2.py3-none-any.whl", hash = "sha256:a48093786cdcde33cad18c2555e8532f34422074448fbc874186f0abd79565cd"}, - {file = "tzdata-2024.2.tar.gz", hash = "sha256:7d85cc416e9382e69095b7bdf4afd9e3880418a2413feec7069d533d6b4e31cc"}, -] - [[package]] name = "urllib3" version = "1.26.20" @@ -2696,10 +2650,122 @@ idna = ">=2.0" multidict = ">=4.0" propcache = ">=0.2.0" +[[package]] +name = "zstandard" +version = "0.23.0" +description = "Zstandard bindings for Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "zstandard-0.23.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:bf0a05b6059c0528477fba9054d09179beb63744355cab9f38059548fedd46a9"}, + {file = "zstandard-0.23.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fc9ca1c9718cb3b06634c7c8dec57d24e9438b2aa9a0f02b8bb36bf478538880"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77da4c6bfa20dd5ea25cbf12c76f181a8e8cd7ea231c673828d0386b1740b8dc"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:b2170c7e0367dde86a2647ed5b6f57394ea7f53545746104c6b09fc1f4223573"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c16842b846a8d2a145223f520b7e18b57c8f476924bda92aeee3a88d11cfc391"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:157e89ceb4054029a289fb504c98c6a9fe8010f1680de0201b3eb5dc20aa6d9e"}, + {file = "zstandard-0.23.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:203d236f4c94cd8379d1ea61db2fce20730b4c38d7f1c34506a31b34edc87bdd"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:dc5d1a49d3f8262be192589a4b72f0d03b72dcf46c51ad5852a4fdc67be7b9e4"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:752bf8a74412b9892f4e5b58f2f890a039f57037f52c89a740757ebd807f33ea"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:80080816b4f52a9d886e67f1f96912891074903238fe54f2de8b786f86baded2"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:84433dddea68571a6d6bd4fbf8ff398236031149116a7fff6f777ff95cad3df9"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ab19a2d91963ed9e42b4e8d77cd847ae8381576585bad79dbd0a8837a9f6620a"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:59556bf80a7094d0cfb9f5e50bb2db27fefb75d5138bb16fb052b61b0e0eeeb0"}, + {file = "zstandard-0.23.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:27d3ef2252d2e62476389ca8f9b0cf2bbafb082a3b6bfe9d90cbcbb5529ecf7c"}, + {file = "zstandard-0.23.0-cp310-cp310-win32.whl", hash = "sha256:5d41d5e025f1e0bccae4928981e71b2334c60f580bdc8345f824e7c0a4c2a813"}, + {file = "zstandard-0.23.0-cp310-cp310-win_amd64.whl", hash = "sha256:519fbf169dfac1222a76ba8861ef4ac7f0530c35dd79ba5727014613f91613d4"}, + {file = "zstandard-0.23.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:34895a41273ad33347b2fc70e1bff4240556de3c46c6ea430a7ed91f9042aa4e"}, + {file = "zstandard-0.23.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:77ea385f7dd5b5676d7fd943292ffa18fbf5c72ba98f7d09fc1fb9e819b34c23"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:983b6efd649723474f29ed42e1467f90a35a74793437d0bc64a5bf482bedfa0a"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:80a539906390591dd39ebb8d773771dc4db82ace6372c4d41e2d293f8e32b8db"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:445e4cb5048b04e90ce96a79b4b63140e3f4ab5f662321975679b5f6360b90e2"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fd30d9c67d13d891f2360b2a120186729c111238ac63b43dbd37a5a40670b8ca"}, + {file = "zstandard-0.23.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d20fd853fbb5807c8e84c136c278827b6167ded66c72ec6f9a14b863d809211c"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ed1708dbf4d2e3a1c5c69110ba2b4eb6678262028afd6c6fbcc5a8dac9cda68e"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:be9b5b8659dff1f913039c2feee1aca499cfbc19e98fa12bc85e037c17ec6ca5"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:65308f4b4890aa12d9b6ad9f2844b7ee42c7f7a4fd3390425b242ffc57498f48"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:98da17ce9cbf3bfe4617e836d561e433f871129e3a7ac16d6ef4c680f13a839c"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:8ed7d27cb56b3e058d3cf684d7200703bcae623e1dcc06ed1e18ecda39fee003"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:b69bb4f51daf461b15e7b3db033160937d3ff88303a7bc808c67bbc1eaf98c78"}, + {file = "zstandard-0.23.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:034b88913ecc1b097f528e42b539453fa82c3557e414b3de9d5632c80439a473"}, + {file = "zstandard-0.23.0-cp311-cp311-win32.whl", hash = "sha256:f2d4380bf5f62daabd7b751ea2339c1a21d1c9463f1feb7fc2bdcea2c29c3160"}, + {file = "zstandard-0.23.0-cp311-cp311-win_amd64.whl", hash = "sha256:62136da96a973bd2557f06ddd4e8e807f9e13cbb0bfb9cc06cfe6d98ea90dfe0"}, + {file = "zstandard-0.23.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b4567955a6bc1b20e9c31612e615af6b53733491aeaa19a6b3b37f3b65477094"}, + {file = "zstandard-0.23.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1e172f57cd78c20f13a3415cc8dfe24bf388614324d25539146594c16d78fcc8"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b0e166f698c5a3e914947388c162be2583e0c638a4703fc6a543e23a88dea3c1"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:12a289832e520c6bd4dcaad68e944b86da3bad0d339ef7989fb7e88f92e96072"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d50d31bfedd53a928fed6707b15a8dbeef011bb6366297cc435accc888b27c20"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:72c68dda124a1a138340fb62fa21b9bf4848437d9ca60bd35db36f2d3345f373"}, + {file = "zstandard-0.23.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:53dd9d5e3d29f95acd5de6802e909ada8d8d8cfa37a3ac64836f3bc4bc5512db"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:6a41c120c3dbc0d81a8e8adc73312d668cd34acd7725f036992b1b72d22c1772"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:40b33d93c6eddf02d2c19f5773196068d875c41ca25730e8288e9b672897c105"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:9206649ec587e6b02bd124fb7799b86cddec350f6f6c14bc82a2b70183e708ba"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:76e79bc28a65f467e0409098fa2c4376931fd3207fbeb6b956c7c476d53746dd"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:66b689c107857eceabf2cf3d3fc699c3c0fe8ccd18df2219d978c0283e4c508a"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:9c236e635582742fee16603042553d276cca506e824fa2e6489db04039521e90"}, + {file = "zstandard-0.23.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a8fffdbd9d1408006baaf02f1068d7dd1f016c6bcb7538682622c556e7b68e35"}, + {file = "zstandard-0.23.0-cp312-cp312-win32.whl", hash = "sha256:dc1d33abb8a0d754ea4763bad944fd965d3d95b5baef6b121c0c9013eaf1907d"}, + {file = "zstandard-0.23.0-cp312-cp312-win_amd64.whl", hash = "sha256:64585e1dba664dc67c7cdabd56c1e5685233fbb1fc1966cfba2a340ec0dfff7b"}, + {file = "zstandard-0.23.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:576856e8594e6649aee06ddbfc738fec6a834f7c85bf7cadd1c53d4a58186ef9"}, + {file = "zstandard-0.23.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38302b78a850ff82656beaddeb0bb989a0322a8bbb1bf1ab10c17506681d772a"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d2240ddc86b74966c34554c49d00eaafa8200a18d3a5b6ffbf7da63b11d74ee2"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2ef230a8fd217a2015bc91b74f6b3b7d6522ba48be29ad4ea0ca3a3775bf7dd5"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:774d45b1fac1461f48698a9d4b5fa19a69d47ece02fa469825b442263f04021f"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6f77fa49079891a4aab203d0b1744acc85577ed16d767b52fc089d83faf8d8ed"}, + {file = "zstandard-0.23.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ac184f87ff521f4840e6ea0b10c0ec90c6b1dcd0bad2f1e4a9a1b4fa177982ea"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c363b53e257246a954ebc7c488304b5592b9c53fbe74d03bc1c64dda153fb847"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e7792606d606c8df5277c32ccb58f29b9b8603bf83b48639b7aedf6df4fe8171"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a0817825b900fcd43ac5d05b8b3079937073d2b1ff9cf89427590718b70dd840"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:9da6bc32faac9a293ddfdcb9108d4b20416219461e4ec64dfea8383cac186690"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:fd7699e8fd9969f455ef2926221e0233f81a2542921471382e77a9e2f2b57f4b"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:d477ed829077cd945b01fc3115edd132c47e6540ddcd96ca169facff28173057"}, + {file = "zstandard-0.23.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:fa6ce8b52c5987b3e34d5674b0ab529a4602b632ebab0a93b07bfb4dfc8f8a33"}, + {file = "zstandard-0.23.0-cp313-cp313-win32.whl", hash = "sha256:a9b07268d0c3ca5c170a385a0ab9fb7fdd9f5fd866be004c4ea39e44edce47dd"}, + {file = "zstandard-0.23.0-cp313-cp313-win_amd64.whl", hash = "sha256:f3513916e8c645d0610815c257cbfd3242adfd5c4cfa78be514e5a3ebb42a41b"}, + {file = "zstandard-0.23.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2ef3775758346d9ac6214123887d25c7061c92afe1f2b354f9388e9e4d48acfc"}, + {file = "zstandard-0.23.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:4051e406288b8cdbb993798b9a45c59a4896b6ecee2f875424ec10276a895740"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e2d1a054f8f0a191004675755448d12be47fa9bebbcffa3cdf01db19f2d30a54"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f83fa6cae3fff8e98691248c9320356971b59678a17f20656a9e59cd32cee6d8"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:32ba3b5ccde2d581b1e6aa952c836a6291e8435d788f656fe5976445865ae045"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2f146f50723defec2975fb7e388ae3a024eb7151542d1599527ec2aa9cacb152"}, + {file = "zstandard-0.23.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1bfe8de1da6d104f15a60d4a8a768288f66aa953bbe00d027398b93fb9680b26"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:29a2bc7c1b09b0af938b7a8343174b987ae021705acabcbae560166567f5a8db"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:61f89436cbfede4bc4e91b4397eaa3e2108ebe96d05e93d6ccc95ab5714be512"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:53ea7cdc96c6eb56e76bb06894bcfb5dfa93b7adcf59d61c6b92674e24e2dd5e"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_i686.whl", hash = "sha256:a4ae99c57668ca1e78597d8b06d5af837f377f340f4cce993b551b2d7731778d"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_ppc64le.whl", hash = "sha256:379b378ae694ba78cef921581ebd420c938936a153ded602c4fea612b7eaa90d"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_s390x.whl", hash = "sha256:50a80baba0285386f97ea36239855f6020ce452456605f262b2d33ac35c7770b"}, + {file = "zstandard-0.23.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:61062387ad820c654b6a6b5f0b94484fa19515e0c5116faf29f41a6bc91ded6e"}, + {file = "zstandard-0.23.0-cp38-cp38-win32.whl", hash = "sha256:b8c0bd73aeac689beacd4e7667d48c299f61b959475cdbb91e7d3d88d27c56b9"}, + {file = "zstandard-0.23.0-cp38-cp38-win_amd64.whl", hash = "sha256:a05e6d6218461eb1b4771d973728f0133b2a4613a6779995df557f70794fd60f"}, + {file = "zstandard-0.23.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3aa014d55c3af933c1315eb4bb06dd0459661cc0b15cd61077afa6489bec63bb"}, + {file = "zstandard-0.23.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:0a7f0804bb3799414af278e9ad51be25edf67f78f916e08afdb983e74161b916"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fb2b1ecfef1e67897d336de3a0e3f52478182d6a47eda86cbd42504c5cbd009a"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:837bb6764be6919963ef41235fd56a6486b132ea64afe5fafb4cb279ac44f259"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1516c8c37d3a053b01c1c15b182f3b5f5eef19ced9b930b684a73bad121addf4"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:48ef6a43b1846f6025dde6ed9fee0c24e1149c1c25f7fb0a0585572b2f3adc58"}, + {file = "zstandard-0.23.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:11e3bf3c924853a2d5835b24f03eeba7fc9b07d8ca499e247e06ff5676461a15"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:2fb4535137de7e244c230e24f9d1ec194f61721c86ebea04e1581d9d06ea1269"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8c24f21fa2af4bb9f2c492a86fe0c34e6d2c63812a839590edaf177b7398f700"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:a8c86881813a78a6f4508ef9daf9d4995b8ac2d147dcb1a450448941398091c9"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_i686.whl", hash = "sha256:fe3b385d996ee0822fd46528d9f0443b880d4d05528fd26a9119a54ec3f91c69"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_ppc64le.whl", hash = "sha256:82d17e94d735c99621bf8ebf9995f870a6b3e6d14543b99e201ae046dfe7de70"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_s390x.whl", hash = "sha256:c7c517d74bea1a6afd39aa612fa025e6b8011982a0897768a2f7c8ab4ebb78a2"}, + {file = "zstandard-0.23.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fd7e0f1cfb70eb2f95a19b472ee7ad6d9a0a992ec0ae53286870c104ca939e5"}, + {file = "zstandard-0.23.0-cp39-cp39-win32.whl", hash = "sha256:43da0f0092281bf501f9c5f6f3b4c975a8a0ea82de49ba3f7100e64d422a1274"}, + {file = "zstandard-0.23.0-cp39-cp39-win_amd64.whl", hash = "sha256:f8346bfa098532bc1fb6c7ef06783e969d87a99dd1d2a5a18a892c1d7a643c58"}, + {file = "zstandard-0.23.0.tar.gz", hash = "sha256:b2d8c62d08e7255f68f7a740bae85b3c9b8e5466baa9cbf7f57f1cde0ac6bc09"}, +] + +[package.dependencies] +cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\""} + +[package.extras] +cffi = ["cffi (>=1.11)"] + [extras] langchain-community = ["langchain-community"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "ab8fc903869cf2ac8dec6997d3eaf754bba6da3a1f42caaa516c733d5c702dcf" +content-hash = "b8796f468f08fa25de5dbca7112f0360a51ecbf8eb5d6a4990fe05befc28a3de" diff --git a/libs/cohere/pyproject.toml b/libs/cohere/pyproject.toml index 58477bb..0dfdccf 100644 --- a/libs/cohere/pyproject.toml +++ b/libs/cohere/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "langchain-cohere" -version = "0.3.5" +version = "0.4.0" description = "An integration package connecting Cohere and LangChain" authors = [] readme = "README.md" @@ -14,9 +14,6 @@ license = "MIT" python = ">=3.9,<4.0" langchain-core = "^0.3.27" cohere = ">=5.5.6,<6.0" -pandas = ">=1.4.3" -tabulate = "^0.9.0" -langchain-experimental = "^0.3.0" langchain-community = { version = "^0.3.0", optional = true } pydantic = ">=2,<3" diff --git a/libs/cohere/tests/integration_tests/csv_agent/__init__.py b/libs/cohere/tests/integration_tests/csv_agent/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/libs/cohere/tests/integration_tests/csv_agent/agent.py b/libs/cohere/tests/integration_tests/csv_agent/agent.py deleted file mode 100644 index 6d13995..0000000 --- a/libs/cohere/tests/integration_tests/csv_agent/agent.py +++ /dev/null @@ -1,55 +0,0 @@ -""" -Test create_csv_agernt implementation. - -Uses the replay testing functionality, so you don't need an API key to run these tests. -https://python.langchain.com/docs/contributing/testing#recording-http-interactions-with-pytest-vcr - -When re-recording these tests you will need to set COHERE_API_KEY. -""" - -import pytest - -from langchain_cohere import ChatCohere -from langchain_cohere.csv_agent.agent import create_csv_agent - - -@pytest.mark.vcr() -def test_single_csv() -> None: - """Test streaming tokens from ChatCohere.""" - llm = ChatCohere() - csv_agent = create_csv_agent( - llm, path="tests/integration_tests/csv_agent/csv/movie_ratings.csv" - ) - resp = csv_agent.invoke({"input": "Which movie has the highest average rating?"}) - assert "output" in resp - assert ( - "The Shawshank Redemption has the highest average rating of 7.25." # noqa: E501 - == resp["output"] - ) - - -@pytest.mark.vcr() -def test_multiple_csv() -> None: - """Test streaming tokens from ChatCohere.""" - llm = ChatCohere() - csv_agent = create_csv_agent( - llm, - path=[ - "tests/integration_tests/csv_agent/csv/movie_ratings.csv", - "tests/integration_tests/csv_agent/csv/movie_bookings.csv", - ], - ) - resp = csv_agent.invoke({"input": "Which movie has the highest average rating?"}) - assert "output" in resp - assert ( - "The movie with the highest average rating is *The Shawshank Redemption* with an average rating of 7.25." # noqa: E501 - == resp["output"] - ) - resp = csv_agent.invoke( - {"input": "who bought the most number of tickets to finding nemo?"} - ) - assert "output" in resp - assert ( - "Penelope bought the most tickets to Finding Nemo." # noqa: E501 - == resp["output"] - ) diff --git a/libs/cohere/tests/integration_tests/csv_agent/cassettes/test_multiple_csv.yaml b/libs/cohere/tests/integration_tests/csv_agent/cassettes/test_multiple_csv.yaml deleted file mode 100644 index e7f3aee..0000000 --- a/libs/cohere/tests/integration_tests/csv_agent/cassettes/test_multiple_csv.yaml +++ /dev/null @@ -1,1359 +0,0 @@ -interactions: -- request: - body: '' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: GET - uri: https://api.cohere.com/v1/models?default_only=true&endpoint=chat - response: - body: - string: '{"models":[{"name":"command-r-plus","endpoints":["generate","chat","summarize"],"finetuned":false,"context_length":128000,"tokenizer_url":"https://storage.googleapis.com/cohere-public/tokenizers/command-r-plus.json","default_endpoints":["chat"]}]}' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Content-Length: - - '247' - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/json - date: - - Thu, 25 Jul 2024 07:35:25 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - c0ca9d55ae2b1dbcd6e2e8567ab54fc2 - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '18' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '38' - status: - code: 200 - message: OK -- request: - body: '{"message": "Which movie has the highest average rating?", "preamble": - "## Task And Context\nYou use your advanced complex reasoning capabilities to - help people by answering their questions and other requests interactively. You - will be asked a very wide array of requests on all kinds of topics. You will - be equipped with a wide range of search engines or similar tools to help you, - which you use to research your answer. You may need to use multiple tools in - parallel or sequentially to complete your task. You should focus on serving - the user''s needs as best you can, which will be wide-ranging. The current date - is Thursday, July 25, 2024 15:35:25\n\n## Style Guide\nUnless the user asks - for a different style of answer, you should answer in full sentences, using - proper grammar and spelling\n", "chat_history": [{"role": "User", "message": - "The user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The Shawshank - Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank Redemption,Jeremy,8 - The user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord - Count: 21\nPreview: movie,name,num_tickets The Shawshank Redemption,John,2 The - Shawshank Redemption,Jerry,2 The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"}], - "tools": [{"name": "file_read", "description": "Returns the textual contents - of an uploaded file, broken up in text chunks", "parameter_definitions": {"filename": - {"description": "The name of the attached file to read.", "type": "str", "required": - true}}}, {"name": "file_peek", "description": "The name of the attached file - to show a peek preview.", "parameter_definitions": {"filename": {"description": - "The name of the attached file to show a peek preview.", "type": "str", "required": - true}}}, {"name": "python_interpreter", "description": "Executes python code - and returns the result. The code runs in a static sandbox without interactive - mode, so print output or save output to a file.", "parameter_definitions": {"code": - {"description": "Python code to execute.", "type": "str", "required": true}}}], - "stream": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '2252' - content-type: - - application/json - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: POST - uri: https://api.cohere.com/v1/chat - response: - body: - string: '{"is_finished":false,"event_type":"stream-start","generation_id":"99479a84-e3a0-4b6b-add3-ac5280424c67"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":"I"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" will"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" use"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" Python"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" to"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" read"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" the"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" data"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" and"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" find"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" the"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" movie"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" with"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" the"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" highest"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" average"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" rating"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":"."} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"name":"python_interpreter"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"{\n \""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"code"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\":"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - \""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"import"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pandas"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - as"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"read"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"(''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tests"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"integration"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tests"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"agent"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"#"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Group"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - by"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - and"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - calculate"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\nav"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"g"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"groupby"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"(''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"[''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'']."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"mean"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"()"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"#"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Find"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - with"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\nh"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"igh"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"est"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rated"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - avg"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"idx"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"max"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"()"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"print"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"("}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\\""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"The"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - with"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - is"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - {"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rated"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - with"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - an"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - of"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - {"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"avg"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"["}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rated"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"]:"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"2"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}\\\")"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}"}} - - {"is_finished":false,"event_type":"tool-calls-generation","text":"I will use - Python to read the data and find the movie with the highest average rating.","tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_ratings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\navg_ratings = movie_ratings.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_rated_movie = avg_ratings.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_rated_movie} with an average - rating of {avg_ratings[highest_rated_movie]:.2f}\")"}}]} - - {"is_finished":true,"event_type":"stream-end","response":{"response_id":"6b098e71-e6dc-487b-9df0-b1555b764de5","text":"I - will use Python to read the data and find the movie with the highest average - rating.","generation_id":"99479a84-e3a0-4b6b-add3-ac5280424c67","chat_history":[{"role":"USER","message":"The - user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The - Shawshank Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank - Redemption,Jeremy,8 The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord Count: 21\nPreview: - movie,name,num_tickets The Shawshank Redemption,John,2 The Shawshank Redemption,Jerry,2 - The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"},{"role":"USER","message":"Which - movie has the highest average rating?"},{"role":"CHATBOT","message":"I will - use Python to read the data and find the movie with the highest average rating.","tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_ratings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\navg_ratings = movie_ratings.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_rated_movie = avg_ratings.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_rated_movie} with an average - rating of {avg_ratings[highest_rated_movie]:.2f}\")"}}]}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":412,"output_tokens":165},"tokens":{"input_tokens":1217,"output_tokens":199}},"tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_ratings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\navg_ratings = movie_ratings.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_rated_movie = avg_ratings.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_rated_movie} with an average - rating of {avg_ratings[highest_rated_movie]:.2f}\")"}}]},"finish_reason":"COMPLETE"} - - ' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Transfer-Encoding: - - chunked - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/stream+json - date: - - Thu, 25 Jul 2024 07:35:25 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - cb6372efb8b43430eeac2852a51bb3cd - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '84' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '37' - status: - code: 200 - message: OK -- request: - body: '{"message": "", "preamble": "## Task And Context\nYou use your advanced - complex reasoning capabilities to help people by answering their questions and - other requests interactively. You will be asked a very wide array of requests - on all kinds of topics. You will be equipped with a wide range of search engines - or similar tools to help you, which you use to research your answer. You may - need to use multiple tools in parallel or sequentially to complete your task. - You should focus on serving the user''s needs as best you can, which will be - wide-ranging. The current date is Thursday, July 25, 2024 15:35:25\n\n## Style - Guide\nUnless the user asks for a different style of answer, you should answer - in full sentences, using proper grammar and spelling\n", "chat_history": [{"role": - "User", "message": "The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord Count: 21\nPreview: - movie,user,rating The Shawshank Redemption,John,8 The Shawshank Redemption,Jerry,6 - The Shawshank Redemption,Jack,7 The Shawshank Redemption,Jeremy,8 The user uploaded - the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord - Count: 21\nPreview: movie,name,num_tickets The Shawshank Redemption,John,2 The - Shawshank Redemption,Jerry,2 The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"}, - {"role": "User", "message": "Which movie has the highest average rating?"}, - {"role": "Chatbot", "message": "I will use Python to read the data and find - the movie with the highest average rating.", "tool_calls": [{"name": "python_interpreter", - "args": {"code": "import pandas as pd\n\nmovie_ratings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\navg_ratings = movie_ratings.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_rated_movie = avg_ratings.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_rated_movie} with an average - rating of {avg_ratings[highest_rated_movie]:.2f}\")"}, "id": "a2a800129e9245bc90d64b8ff6a45b7f", - "type": "tool_call"}]}], "tools": [{"name": "file_read", "description": "Returns - the textual contents of an uploaded file, broken up in text chunks", "parameter_definitions": - {"filename": {"description": "The name of the attached file to read.", "type": - "str", "required": true}}}, {"name": "file_peek", "description": "The name of - the attached file to show a peek preview.", "parameter_definitions": {"filename": - {"description": "The name of the attached file to show a peek preview.", "type": - "str", "required": true}}}, {"name": "python_interpreter", "description": "Executes - python code and returns the result. The code runs in a static sandbox without - interactive mode, so print output or save output to a file.", "parameter_definitions": - {"code": {"description": "Python code to execute.", "type": "str", "required": - true}}}], "tool_results": [{"call": {"name": "python_interpreter", "parameters": - {"code": "import pandas as pd\n\nmovie_ratings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\navg_ratings = movie_ratings.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_rated_movie = avg_ratings.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_rated_movie} with an average - rating of {avg_ratings[highest_rated_movie]:.2f}\")"}}, "outputs": [{"output": - "The movie with the highest average rating is The Shawshank Redemption with - an average rating of 7.25\n"}]}], "stream": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '3687' - content-type: - - application/json - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: POST - uri: https://api.cohere.com/v1/chat - response: - body: - string: '{"is_finished":false,"event_type":"stream-start","generation_id":"3eab743c-87fe-48d4-83a1-05c0bf30f965"} - - {"is_finished":false,"event_type":"search-results","documents":[{"id":"python_interpreter:0:3:0","output":"The - movie with the highest average rating is The Shawshank Redemption with an - average rating of 7.25\n","tool_name":"python_interpreter"}]} - - {"is_finished":false,"event_type":"text-generation","text":"The"} - - {"is_finished":false,"event_type":"text-generation","text":" movie"} - - {"is_finished":false,"event_type":"text-generation","text":" with"} - - {"is_finished":false,"event_type":"text-generation","text":" the"} - - {"is_finished":false,"event_type":"text-generation","text":" highest"} - - {"is_finished":false,"event_type":"text-generation","text":" average"} - - {"is_finished":false,"event_type":"text-generation","text":" rating"} - - {"is_finished":false,"event_type":"text-generation","text":" is"} - - {"is_finished":false,"event_type":"text-generation","text":" *"} - - {"is_finished":false,"event_type":"text-generation","text":"The"} - - {"is_finished":false,"event_type":"text-generation","text":" Shaw"} - - {"is_finished":false,"event_type":"text-generation","text":"shank"} - - {"is_finished":false,"event_type":"text-generation","text":" Redemption"} - - {"is_finished":false,"event_type":"text-generation","text":"*"} - - {"is_finished":false,"event_type":"text-generation","text":" with"} - - {"is_finished":false,"event_type":"text-generation","text":" an"} - - {"is_finished":false,"event_type":"text-generation","text":" average"} - - {"is_finished":false,"event_type":"text-generation","text":" rating"} - - {"is_finished":false,"event_type":"text-generation","text":" of"} - - {"is_finished":false,"event_type":"text-generation","text":" 7"} - - {"is_finished":false,"event_type":"text-generation","text":"."} - - {"is_finished":false,"event_type":"text-generation","text":"2"} - - {"is_finished":false,"event_type":"text-generation","text":"5"} - - {"is_finished":false,"event_type":"text-generation","text":"."} - - {"is_finished":false,"event_type":"citation-generation","citations":[{"start":46,"end":70,"text":"The - Shawshank Redemption","document_ids":["python_interpreter:0:3:0"]}]} - - {"is_finished":false,"event_type":"citation-generation","citations":[{"start":98,"end":102,"text":"7.25","document_ids":["python_interpreter:0:3:0"]}]} - - {"is_finished":true,"event_type":"stream-end","response":{"response_id":"e9d8f67a-f0f2-46b0-81db-809971d6301b","text":"The - movie with the highest average rating is *The Shawshank Redemption* with an - average rating of 7.25.","generation_id":"3eab743c-87fe-48d4-83a1-05c0bf30f965","chat_history":[{"role":"USER","message":"The - user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The - Shawshank Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank - Redemption,Jeremy,8 The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord Count: 21\nPreview: - movie,name,num_tickets The Shawshank Redemption,John,2 The Shawshank Redemption,Jerry,2 - The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"},{"role":"USER","message":"Which - movie has the highest average rating?"},{"role":"CHATBOT","message":"I will - use Python to read the data and find the movie with the highest average rating.","tool_calls":[{"name":"python_interpreter","parameters":null}]},{"role":"TOOL","tool_results":[{"call":{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_ratings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\navg_ratings = movie_ratings.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_rated_movie = avg_ratings.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_rated_movie} with an average - rating of {avg_ratings[highest_rated_movie]:.2f}\")"}},"outputs":[{"output":"The - movie with the highest average rating is The Shawshank Redemption with an - average rating of 7.25\n"}]}]},{"role":"CHATBOT","message":"The movie with - the highest average rating is *The Shawshank Redemption* with an average rating - of 7.25."}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":463,"output_tokens":25},"tokens":{"input_tokens":1468,"output_tokens":91}},"citations":[{"start":46,"end":70,"text":"The - Shawshank Redemption","document_ids":["python_interpreter:0:3:0"]},{"start":98,"end":102,"text":"7.25","document_ids":["python_interpreter:0:3:0"]}],"documents":[{"id":"python_interpreter:0:3:0","output":"The - movie with the highest average rating is The Shawshank Redemption with an - average rating of 7.25\n","tool_name":"python_interpreter"}]},"finish_reason":"COMPLETE"} - - ' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Transfer-Encoding: - - chunked - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/stream+json - date: - - Thu, 25 Jul 2024 07:35:30 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - 2b477db370c0a0dfad26b8ce83020267 - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '60' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '36' - status: - code: 200 - message: OK -- request: - body: '{"message": "who bought the most number of tickets to finding nemo?", "preamble": - "## Task And Context\nYou use your advanced complex reasoning capabilities to - help people by answering their questions and other requests interactively. You - will be asked a very wide array of requests on all kinds of topics. You will - be equipped with a wide range of search engines or similar tools to help you, - which you use to research your answer. You may need to use multiple tools in - parallel or sequentially to complete your task. You should focus on serving - the user''s needs as best you can, which will be wide-ranging. The current date - is Thursday, July 25, 2024 15:35:25\n\n## Style Guide\nUnless the user asks - for a different style of answer, you should answer in full sentences, using - proper grammar and spelling\n", "chat_history": [{"role": "User", "message": - "The user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The Shawshank - Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank Redemption,Jeremy,8 - The user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord - Count: 21\nPreview: movie,name,num_tickets The Shawshank Redemption,John,2 The - Shawshank Redemption,Jerry,2 The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"}], - "tools": [{"name": "file_read", "description": "Returns the textual contents - of an uploaded file, broken up in text chunks", "parameter_definitions": {"filename": - {"description": "The name of the attached file to read.", "type": "str", "required": - true}}}, {"name": "file_peek", "description": "The name of the attached file - to show a peek preview.", "parameter_definitions": {"filename": {"description": - "The name of the attached file to show a peek preview.", "type": "str", "required": - true}}}, {"name": "python_interpreter", "description": "Executes python code - and returns the result. The code runs in a static sandbox without interactive - mode, so print output or save output to a file.", "parameter_definitions": {"code": - {"description": "Python code to execute.", "type": "str", "required": true}}}], - "stream": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '2263' - content-type: - - application/json - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: POST - uri: https://api.cohere.com/v1/chat - response: - body: - string: '{"is_finished":false,"event_type":"stream-start","generation_id":"b00ad359-4e4f-41f9-9d05-6b2ecb5a94e8"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":"I"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" will"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" use"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" Python"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" to"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" find"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" the"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" answer"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":"."} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"name":"python_interpreter"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"{\n \""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"code"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\":"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - \""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"import"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pandas"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - as"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"book"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"read"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"(''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tests"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"integration"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tests"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"agent"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"book"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"#"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Filter"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - for"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Finding"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Nemo"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"finding"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"nem"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"o"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"book"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"book"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"["}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"book"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"[''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'']"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - =="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"Finding"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Nemo"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'']"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"#"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Group"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - by"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - name"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - and"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - sum"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - number"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - of"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - tickets"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"max"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tickets"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"bought"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - finding"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"nem"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"o"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"book"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"groupby"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"(''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"name"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"[''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"num"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tickets"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'']."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"sum"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"()."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"idx"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"max"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"()"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"print"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"("}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"The"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - person"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - who"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - bought"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - most"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - tickets"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - to"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Finding"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Nemo"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - is"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - {"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"max"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tickets"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"bought"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')\""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}"}} - - {"is_finished":false,"event_type":"tool-calls-generation","text":"I will use - Python to find the answer.","tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_bookings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_bookings.csv'')\n\n# - Filter for Finding Nemo\nfinding_nemo_bookings = movie_bookings[movie_bookings[''movie''] - == ''Finding Nemo'']\n\n# Group by name and sum the number of tickets\nmax_tickets_bought - = finding_nemo_bookings.groupby(''name'')[''num_tickets''].sum().idxmax()\n\nprint(f''The - person who bought the most tickets to Finding Nemo is {max_tickets_bought}.'')"}}]} - - {"is_finished":true,"event_type":"stream-end","response":{"response_id":"94046a6a-ffcf-4924-a5d6-2b375fba38d8","text":"I - will use Python to find the answer.","generation_id":"b00ad359-4e4f-41f9-9d05-6b2ecb5a94e8","chat_history":[{"role":"USER","message":"The - user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The - Shawshank Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank - Redemption,Jeremy,8 The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord Count: 21\nPreview: - movie,name,num_tickets The Shawshank Redemption,John,2 The Shawshank Redemption,Jerry,2 - The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"},{"role":"USER","message":"who - bought the most number of tickets to finding nemo?"},{"role":"CHATBOT","message":"I - will use Python to find the answer.","tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_bookings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_bookings.csv'')\n\n# - Filter for Finding Nemo\nfinding_nemo_bookings = movie_bookings[movie_bookings[''movie''] - == ''Finding Nemo'']\n\n# Group by name and sum the number of tickets\nmax_tickets_bought - = finding_nemo_bookings.groupby(''name'')[''num_tickets''].sum().idxmax()\n\nprint(f''The - person who bought the most tickets to Finding Nemo is {max_tickets_bought}.'')"}}]}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":416,"output_tokens":161},"tokens":{"input_tokens":1221,"output_tokens":194}},"tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_bookings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_bookings.csv'')\n\n# - Filter for Finding Nemo\nfinding_nemo_bookings = movie_bookings[movie_bookings[''movie''] - == ''Finding Nemo'']\n\n# Group by name and sum the number of tickets\nmax_tickets_bought - = finding_nemo_bookings.groupby(''name'')[''num_tickets''].sum().idxmax()\n\nprint(f''The - person who bought the most tickets to Finding Nemo is {max_tickets_bought}.'')"}}]},"finish_reason":"COMPLETE"} - - ' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Transfer-Encoding: - - chunked - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/stream+json - date: - - Thu, 25 Jul 2024 07:35:35 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - 38e56fdc3e09be70e25f0edf5b8d9222 - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '82' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '35' - status: - code: 200 - message: OK -- request: - body: '{"message": "", "preamble": "## Task And Context\nYou use your advanced - complex reasoning capabilities to help people by answering their questions and - other requests interactively. You will be asked a very wide array of requests - on all kinds of topics. You will be equipped with a wide range of search engines - or similar tools to help you, which you use to research your answer. You may - need to use multiple tools in parallel or sequentially to complete your task. - You should focus on serving the user''s needs as best you can, which will be - wide-ranging. The current date is Thursday, July 25, 2024 15:35:25\n\n## Style - Guide\nUnless the user asks for a different style of answer, you should answer - in full sentences, using proper grammar and spelling\n", "chat_history": [{"role": - "User", "message": "The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord Count: 21\nPreview: - movie,user,rating The Shawshank Redemption,John,8 The Shawshank Redemption,Jerry,6 - The Shawshank Redemption,Jack,7 The Shawshank Redemption,Jeremy,8 The user uploaded - the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord - Count: 21\nPreview: movie,name,num_tickets The Shawshank Redemption,John,2 The - Shawshank Redemption,Jerry,2 The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"}, - {"role": "User", "message": "who bought the most number of tickets to finding - nemo?"}, {"role": "Chatbot", "message": "I will use Python to find the answer.", - "tool_calls": [{"name": "python_interpreter", "args": {"code": "import pandas - as pd\n\nmovie_bookings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_bookings.csv'')\n\n# - Filter for Finding Nemo\nfinding_nemo_bookings = movie_bookings[movie_bookings[''movie''] - == ''Finding Nemo'']\n\n# Group by name and sum the number of tickets\nmax_tickets_bought - = finding_nemo_bookings.groupby(''name'')[''num_tickets''].sum().idxmax()\n\nprint(f''The - person who bought the most tickets to Finding Nemo is {max_tickets_bought}.'')"}, - "id": "89fc686877d04412b86730723f49de57", "type": "tool_call"}]}], "tools": - [{"name": "file_read", "description": "Returns the textual contents of an uploaded - file, broken up in text chunks", "parameter_definitions": {"filename": {"description": - "The name of the attached file to read.", "type": "str", "required": true}}}, - {"name": "file_peek", "description": "The name of the attached file to show - a peek preview.", "parameter_definitions": {"filename": {"description": "The - name of the attached file to show a peek preview.", "type": "str", "required": - true}}}, {"name": "python_interpreter", "description": "Executes python code - and returns the result. The code runs in a static sandbox without interactive - mode, so print output or save output to a file.", "parameter_definitions": {"code": - {"description": "Python code to execute.", "type": "str", "required": true}}}], - "tool_results": [{"call": {"name": "python_interpreter", "parameters": {"code": - "import pandas as pd\n\nmovie_bookings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_bookings.csv'')\n\n# - Filter for Finding Nemo\nfinding_nemo_bookings = movie_bookings[movie_bookings[''movie''] - == ''Finding Nemo'']\n\n# Group by name and sum the number of tickets\nmax_tickets_bought - = finding_nemo_bookings.groupby(''name'')[''num_tickets''].sum().idxmax()\n\nprint(f''The - person who bought the most tickets to Finding Nemo is {max_tickets_bought}.'')"}}, - "outputs": [{"output": "The person who bought the most tickets to Finding Nemo - is Penelope.\n"}]}], "stream": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '3598' - content-type: - - application/json - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: POST - uri: https://api.cohere.com/v1/chat - response: - body: - string: '{"is_finished":false,"event_type":"stream-start","generation_id":"e9eb1e09-b457-401c-8a03-c56e5110dc72"} - - {"is_finished":false,"event_type":"search-results","documents":[{"id":"python_interpreter:0:3:0","output":"The - person who bought the most tickets to Finding Nemo is Penelope.\n","tool_name":"python_interpreter"}]} - - {"is_finished":false,"event_type":"text-generation","text":"Penelope"} - - {"is_finished":false,"event_type":"text-generation","text":" bought"} - - {"is_finished":false,"event_type":"text-generation","text":" the"} - - {"is_finished":false,"event_type":"text-generation","text":" most"} - - {"is_finished":false,"event_type":"text-generation","text":" tickets"} - - {"is_finished":false,"event_type":"text-generation","text":" to"} - - {"is_finished":false,"event_type":"text-generation","text":" Finding"} - - {"is_finished":false,"event_type":"text-generation","text":" Nemo"} - - {"is_finished":false,"event_type":"text-generation","text":"."} - - {"is_finished":false,"event_type":"citation-generation","citations":[{"start":0,"end":8,"text":"Penelope","document_ids":["python_interpreter:0:3:0"]}]} - - {"is_finished":true,"event_type":"stream-end","response":{"response_id":"4c8769bb-35a3-4819-bf34-6b060b501276","text":"Penelope - bought the most tickets to Finding Nemo.","generation_id":"e9eb1e09-b457-401c-8a03-c56e5110dc72","chat_history":[{"role":"USER","message":"The - user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The - Shawshank Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank - Redemption,Jeremy,8 The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_bookings.csv\nWord Count: 21\nPreview: - movie,name,num_tickets The Shawshank Redemption,John,2 The Shawshank Redemption,Jerry,2 - The Shawshank Redemption,Jack,4 The Shawshank Redemption,Jeremy,2"},{"role":"USER","message":"who - bought the most number of tickets to finding nemo?"},{"role":"CHATBOT","message":"I - will use Python to find the answer.","tool_calls":[{"name":"python_interpreter","parameters":null}]},{"role":"TOOL","tool_results":[{"call":{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\nmovie_bookings = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_bookings.csv'')\n\n# - Filter for Finding Nemo\nfinding_nemo_bookings = movie_bookings[movie_bookings[''movie''] - == ''Finding Nemo'']\n\n# Group by name and sum the number of tickets\nmax_tickets_bought - = finding_nemo_bookings.groupby(''name'')[''num_tickets''].sum().idxmax()\n\nprint(f''The - person who bought the most tickets to Finding Nemo is {max_tickets_bought}.'')"}},"outputs":[{"output":"The - person who bought the most tickets to Finding Nemo is Penelope.\n"}]}]},{"role":"CHATBOT","message":"Penelope - bought the most tickets to Finding Nemo."}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":449,"output_tokens":10},"tokens":{"input_tokens":1458,"output_tokens":52}},"citations":[{"start":0,"end":8,"text":"Penelope","document_ids":["python_interpreter:0:3:0"]}],"documents":[{"id":"python_interpreter:0:3:0","output":"The - person who bought the most tickets to Finding Nemo is Penelope.\n","tool_name":"python_interpreter"}]},"finish_reason":"COMPLETE"} - - ' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Transfer-Encoding: - - chunked - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/stream+json - date: - - Thu, 25 Jul 2024 07:35:45 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - d835ac6da94442dbfde8d366921c1336 - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '72' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '34' - status: - code: 200 - message: OK -version: 1 diff --git a/libs/cohere/tests/integration_tests/csv_agent/cassettes/test_single_csv.yaml b/libs/cohere/tests/integration_tests/csv_agent/cassettes/test_single_csv.yaml deleted file mode 100644 index 54e1d38..0000000 --- a/libs/cohere/tests/integration_tests/csv_agent/cassettes/test_single_csv.yaml +++ /dev/null @@ -1,680 +0,0 @@ -interactions: -- request: - body: '' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: GET - uri: https://api.cohere.com/v1/models?default_only=true&endpoint=chat - response: - body: - string: '{"models":[{"name":"command-r-plus","endpoints":["generate","chat","summarize"],"finetuned":false,"context_length":128000,"tokenizer_url":"https://storage.googleapis.com/cohere-public/tokenizers/command-r-plus.json","default_endpoints":["chat"]}]}' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Content-Length: - - '247' - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/json - date: - - Thu, 25 Jul 2024 07:35:17 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - c040d45482ffab7ae107088f69d70391 - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '26' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '39' - status: - code: 200 - message: OK -- request: - body: '{"message": "Which movie has the highest average rating?", "preamble": - "## Task And Context\nYou use your advanced complex reasoning capabilities to - help people by answering their questions and other requests interactively. You - will be asked a very wide array of requests on all kinds of topics. You will - be equipped with a wide range of search engines or similar tools to help you, - which you use to research your answer. You may need to use multiple tools in - parallel or sequentially to complete your task. You should focus on serving - the user''s needs as best you can, which will be wide-ranging. The current date - is Thursday, July 25, 2024 15:35:17\n\n## Style Guide\nUnless the user asks - for a different style of answer, you should answer in full sentences, using - proper grammar and spelling\n", "chat_history": [{"role": "User", "message": - "The user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The Shawshank - Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank Redemption,Jeremy,8"}], - "tools": [{"name": "file_read", "description": "Returns the textual contents - of an uploaded file, broken up in text chunks", "parameter_definitions": {"filename": - {"description": "The name of the attached file to read.", "type": "str", "required": - true}}}, {"name": "file_peek", "description": "The name of the attached file - to show a peek preview.", "parameter_definitions": {"filename": {"description": - "The name of the attached file to show a peek preview.", "type": "str", "required": - true}}}, {"name": "python_interpreter", "description": "Executes python code - and returns the result. The code runs in a static sandbox without interactive - mode, so print output or save output to a file.", "parameter_definitions": {"code": - {"description": "Python code to execute.", "type": "str", "required": true}}}], - "stream": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '1959' - content-type: - - application/json - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: POST - uri: https://api.cohere.com/v1/chat - response: - body: - string: '{"is_finished":false,"event_type":"stream-start","generation_id":"8d254450-11c6-4863-a2ec-914e9e834832"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":"I"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" will"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" use"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" Python"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" to"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" find"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" the"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" movie"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" with"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" the"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" highest"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" average"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":" rating"} - - {"is_finished":false,"event_type":"tool-calls-chunk","text":"."} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"name":"python_interpreter"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"{\n \""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"code"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\":"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - \""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"import"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pandas"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - as"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\nd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - pd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"read"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"(''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tests"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"integration"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"tests"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"agent"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"/"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"ratings"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"csv"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"#"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Group"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - by"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - and"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - calculate"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\nd"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"grouped"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - df"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"groupby"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"(''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'')"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"[''"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"'']."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"mean"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"()"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"#"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - Find"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - with"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\nh"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"igh"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"est"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"avg"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - ="}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - df"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"grouped"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"idx"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"max"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"()"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"print"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"("}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\\\""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"The"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - movie"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - with"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - the"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - is"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - {"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"highest"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"avg"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - with"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - an"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - average"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - rating"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - of"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":" - {"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"df"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"_"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"grouped"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"max"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"():"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"."}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"2"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"f"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}\\\")"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\""}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"\n"}} - - {"is_finished":false,"event_type":"tool-calls-chunk","tool_call_delta":{"index":0,"parameters":"}"}} - - {"is_finished":false,"event_type":"tool-calls-generation","text":"I will use - Python to find the movie with the highest average rating.","tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\ndf = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\ndf_grouped = df.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_avg_rating = df_grouped.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_avg_rating} with an average - rating of {df_grouped.max():.2f}\")"}}]} - - {"is_finished":true,"event_type":"stream-end","response":{"response_id":"51013092-dabf-4e63-9f2f-44473c1ee60f","text":"I - will use Python to find the movie with the highest average rating.","generation_id":"8d254450-11c6-4863-a2ec-914e9e834832","chat_history":[{"role":"USER","message":"The - user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The - Shawshank Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank - Redemption,Jeremy,8"},{"role":"USER","message":"Which movie has the highest - average rating?"},{"role":"CHATBOT","message":"I will use Python to find the - movie with the highest average rating.","tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\ndf = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\ndf_grouped = df.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_avg_rating = df_grouped.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_avg_rating} with an average - rating of {df_grouped.max():.2f}\")"}}]}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":335,"output_tokens":153},"tokens":{"input_tokens":1140,"output_tokens":187}},"tool_calls":[{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\ndf = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\ndf_grouped = df.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_avg_rating = df_grouped.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_avg_rating} with an average - rating of {df_grouped.max():.2f}\")"}}]},"finish_reason":"COMPLETE"} - - ' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Transfer-Encoding: - - chunked - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/stream+json - date: - - Thu, 25 Jul 2024 07:35:18 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - 89343f056387fb7efc2549e26c51cdfc - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '126' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '39' - status: - code: 200 - message: OK -- request: - body: '{"message": "", "preamble": "## Task And Context\nYou use your advanced - complex reasoning capabilities to help people by answering their questions and - other requests interactively. You will be asked a very wide array of requests - on all kinds of topics. You will be equipped with a wide range of search engines - or similar tools to help you, which you use to research your answer. You may - need to use multiple tools in parallel or sequentially to complete your task. - You should focus on serving the user''s needs as best you can, which will be - wide-ranging. The current date is Thursday, July 25, 2024 15:35:17\n\n## Style - Guide\nUnless the user asks for a different style of answer, you should answer - in full sentences, using proper grammar and spelling\n", "chat_history": [{"role": - "User", "message": "The user uploaded the following attachments:\nFilename: - tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord Count: 21\nPreview: - movie,user,rating The Shawshank Redemption,John,8 The Shawshank Redemption,Jerry,6 - The Shawshank Redemption,Jack,7 The Shawshank Redemption,Jeremy,8"}, {"role": - "User", "message": "Which movie has the highest average rating?"}, {"role": - "Chatbot", "message": "I will use Python to find the movie with the highest - average rating.", "tool_calls": [{"name": "python_interpreter", "args": {"code": - "import pandas as pd\n\ndf = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\ndf_grouped = df.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_avg_rating = df_grouped.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_avg_rating} with an average - rating of {df_grouped.max():.2f}\")"}, "id": "142b5b7f5a054e9f825aa5dfece01d09", - "type": "tool_call"}]}], "tools": [{"name": "file_read", "description": "Returns - the textual contents of an uploaded file, broken up in text chunks", "parameter_definitions": - {"filename": {"description": "The name of the attached file to read.", "type": - "str", "required": true}}}, {"name": "file_peek", "description": "The name of - the attached file to show a peek preview.", "parameter_definitions": {"filename": - {"description": "The name of the attached file to show a peek preview.", "type": - "str", "required": true}}}, {"name": "python_interpreter", "description": "Executes - python code and returns the result. The code runs in a static sandbox without - interactive mode, so print output or save output to a file.", "parameter_definitions": - {"code": {"description": "Python code to execute.", "type": "str", "required": - true}}}], "tool_results": [{"call": {"name": "python_interpreter", "parameters": - {"code": "import pandas as pd\n\ndf = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\ndf_grouped = df.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_avg_rating = df_grouped.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_avg_rating} with an average - rating of {df_grouped.max():.2f}\")"}}, "outputs": [{"output": "The movie with - the highest average rating is The Shawshank Redemption with an average rating - of 7.25\n"}]}], "stream": true}' - headers: - accept: - - '*/*' - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '3292' - content-type: - - application/json - host: - - api.cohere.com - user-agent: - - python-httpx/0.27.0 - x-client-name: - - langchain:partner - x-fern-language: - - Python - x-fern-sdk-name: - - cohere - x-fern-sdk-version: - - 5.5.8 - method: POST - uri: https://api.cohere.com/v1/chat - response: - body: - string: '{"is_finished":false,"event_type":"stream-start","generation_id":"b380e804-7f97-44e2-972d-b03da3bcb872"} - - {"is_finished":false,"event_type":"search-results","documents":[{"id":"python_interpreter:0:3:0","output":"The - movie with the highest average rating is The Shawshank Redemption with an - average rating of 7.25\n","tool_name":"python_interpreter"}]} - - {"is_finished":false,"event_type":"text-generation","text":"The"} - - {"is_finished":false,"event_type":"text-generation","text":" Shaw"} - - {"is_finished":false,"event_type":"text-generation","text":"shank"} - - {"is_finished":false,"event_type":"text-generation","text":" Redemption"} - - {"is_finished":false,"event_type":"text-generation","text":" has"} - - {"is_finished":false,"event_type":"text-generation","text":" the"} - - {"is_finished":false,"event_type":"text-generation","text":" highest"} - - {"is_finished":false,"event_type":"text-generation","text":" average"} - - {"is_finished":false,"event_type":"text-generation","text":" rating"} - - {"is_finished":false,"event_type":"text-generation","text":" of"} - - {"is_finished":false,"event_type":"text-generation","text":" 7"} - - {"is_finished":false,"event_type":"text-generation","text":"."} - - {"is_finished":false,"event_type":"text-generation","text":"2"} - - {"is_finished":false,"event_type":"text-generation","text":"5"} - - {"is_finished":false,"event_type":"text-generation","text":"."} - - {"is_finished":false,"event_type":"citation-generation","citations":[{"start":0,"end":24,"text":"The - Shawshank Redemption","document_ids":["python_interpreter:0:3:0"]}]} - - {"is_finished":false,"event_type":"citation-generation","citations":[{"start":59,"end":63,"text":"7.25","document_ids":["python_interpreter:0:3:0"]}]} - - {"is_finished":true,"event_type":"stream-end","response":{"response_id":"e5f12a46-06fc-42b1-a14c-177ed5d7f3d7","text":"The - Shawshank Redemption has the highest average rating of 7.25.","generation_id":"b380e804-7f97-44e2-972d-b03da3bcb872","chat_history":[{"role":"USER","message":"The - user uploaded the following attachments:\nFilename: tests/integration_tests/csv_agent/csv/movie_ratings.csv\nWord - Count: 21\nPreview: movie,user,rating The Shawshank Redemption,John,8 The - Shawshank Redemption,Jerry,6 The Shawshank Redemption,Jack,7 The Shawshank - Redemption,Jeremy,8"},{"role":"USER","message":"Which movie has the highest - average rating?"},{"role":"CHATBOT","message":"I will use Python to find the - movie with the highest average rating.","tool_calls":[{"name":"python_interpreter","parameters":null}]},{"role":"TOOL","tool_results":[{"call":{"name":"python_interpreter","parameters":{"code":"import - pandas as pd\n\ndf = pd.read_csv(''tests/integration_tests/csv_agent/csv/movie_ratings.csv'')\n\n# - Group by movie and calculate average rating\ndf_grouped = df.groupby(''movie'')[''rating''].mean()\n\n# - Find the movie with the highest average rating\nhighest_avg_rating = df_grouped.idxmax()\n\nprint(f\"The - movie with the highest average rating is {highest_avg_rating} with an average - rating of {df_grouped.max():.2f}\")"}},"outputs":[{"output":"The movie with - the highest average rating is The Shawshank Redemption with an average rating - of 7.25\n"}]}]},{"role":"CHATBOT","message":"The Shawshank Redemption has - the highest average rating of 7.25."}],"finish_reason":"COMPLETE","meta":{"api_version":{"version":"1"},"billed_units":{"input_tokens":382,"output_tokens":16},"tokens":{"input_tokens":1379,"output_tokens":75}},"citations":[{"start":0,"end":24,"text":"The - Shawshank Redemption","document_ids":["python_interpreter:0:3:0"]},{"start":59,"end":63,"text":"7.25","document_ids":["python_interpreter:0:3:0"]}],"documents":[{"id":"python_interpreter:0:3:0","output":"The - movie with the highest average rating is The Shawshank Redemption with an - average rating of 7.25\n","tool_name":"python_interpreter"}]},"finish_reason":"COMPLETE"} - - ' - headers: - Alt-Svc: - - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 - Transfer-Encoding: - - chunked - Via: - - 1.1 google - access-control-expose-headers: - - X-Debug-Trace-ID - cache-control: - - no-cache, no-store, no-transform, must-revalidate, private, max-age=0 - content-type: - - application/stream+json - date: - - Thu, 25 Jul 2024 07:35:23 GMT - expires: - - Thu, 01 Jan 1970 00:00:00 UTC - pragma: - - no-cache - server: - - envoy - vary: - - Origin - x-accel-expires: - - '0' - x-debug-trace-id: - - f5c2d4cd7e98b0187207935f8087de7d - x-endpoint-monthly-call-limit: - - '1000' - x-envoy-upstream-service-time: - - '81' - x-trial-endpoint-call-limit: - - '40' - x-trial-endpoint-call-remaining: - - '38' - status: - code: 200 - message: OK -version: 1 diff --git a/libs/cohere/tests/integration_tests/csv_agent/csv/movie_bookings.csv b/libs/cohere/tests/integration_tests/csv_agent/csv/movie_bookings.csv deleted file mode 100644 index bfc068b..0000000 --- a/libs/cohere/tests/integration_tests/csv_agent/csv/movie_bookings.csv +++ /dev/null @@ -1,9 +0,0 @@ -movie,name,num_tickets -The Shawshank Redemption,John,2 -The Shawshank Redemption,Jerry,2 -The Shawshank Redemption,Jack,4 -The Shawshank Redemption,Jeremy,2 -Finding Nemo,Darren,3 -Finding Nemo,Jones,2 -Finding Nemo,King,1 -Finding Nemo,Penelope,5 \ No newline at end of file diff --git a/libs/cohere/tests/integration_tests/csv_agent/csv/movie_ratings.csv b/libs/cohere/tests/integration_tests/csv_agent/csv/movie_ratings.csv deleted file mode 100644 index deff004..0000000 --- a/libs/cohere/tests/integration_tests/csv_agent/csv/movie_ratings.csv +++ /dev/null @@ -1,9 +0,0 @@ -movie,user,rating -The Shawshank Redemption,John,8 -The Shawshank Redemption,Jerry,6 -The Shawshank Redemption,Jack,7 -The Shawshank Redemption,Jeremy,8 -Finding Nemo,Darren,9 -Finding Nemo,Jones,5 -Finding Nemo,King,6 -Finding Nemo,Penelope,8 \ No newline at end of file diff --git a/libs/cohere/tests/unit_tests/test_imports.py b/libs/cohere/tests/unit_tests/test_imports.py index 3fe1d3b..a9969d1 100644 --- a/libs/cohere/tests/unit_tests/test_imports.py +++ b/libs/cohere/tests/unit_tests/test_imports.py @@ -8,7 +8,6 @@ "CohereRerank", "create_cohere_tools_agent", "create_cohere_react_agent", - "create_csv_agent", "create_sql_agent", "load_summarize_chain", ]