The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Harrison/fix lint (#138)
Harrison Chase9f223e6ccce8
diff --git a/langchain/chains/mapreduce.py b/langchain/chains/mapreduce.pyindex 4a2cc6417e..8286e49cca 100644--- a/langchain/chains/mapreduce.py+++ b/langchain/chains/mapreduce.py@@ -59,7 +59,7 @@ class MapReduceChain(Chain, BaseModel):def _call(self, inputs: Dict[str, str]) -> Dict[str, str]:# Split the larger text into smaller chunks.- docs = self.text_splitter.split_text(inputs[self.input_key],)+ docs = self.text_splitter.split_text(inputs[self.input_key])# Now that we have the chunks, we send them to the LLM and track results.# This is the "map" part.summaries = []diff --git a/langchain/chains/natbot/crawler.py b/langchain/chains/natbot/crawler.pyindex ec14d24973..b15e0eace9 100644--- a/langchain/chains/natbot/crawler.py+++ b/langchain/chains/natbot/crawler.py@@ -28,8 +28,7 @@ class Crawler:"Could not import playwright python package. ""Please it install it with `pip install playwright`.")- self.browser = sync_playwright().start().chromium.launch(headless=False,)-+ self.browser = sync_playwright().start().chromium.launch(headless=False)self.page = self.browser.new_page()self.page.set_viewport_size({"width": 1280, "height": 1080})diff --git a/langchain/chains/react/prompt.py b/langchain/chains/react/prompt.pyindex 8f7f55d20f..8a3b2cfe81 100644--- a/langchain/chains/react/prompt.py+++ b/langchain/chains/react/prompt.py@@ -109,4 +109,4 @@ Action 3: Finish[yes]""",]SUFFIX = """\n\nQuestion: {input}"""-PROMPT = Prompt.from_examples(EXAMPLES, SUFFIX, ["input"],)+PROMPT = Prompt.from_examples(EXAMPLES, SUFFIX, ["input"])diff --git a/langchain/chains/self_ask_with_search/prompt.py b/langchain/chains/self_ask_with_search/prompt.pyindex 4c7fff87b1..02f7ab3f51 100644--- a/langchain/chains/self_ask_with_search/prompt.py+++ b/langchain/chains/self_ask_with_search/prompt.py@@ -38,4 +38,4 @@ Intermediate Answer: New Zealand.So the final answer is: NoQuestion: {input}"""-PROMPT = Prompt(input_variables=["input"], template=_DEFAULT_TEMPLATE,)+PROMPT = Prompt(input_variables=["input"], template=_DEFAULT_TEMPLATE)diff --git a/langchain/chains/sql_database/prompt.py b/langchain/chains/sql_database/prompt.pyindex 4532ad2459..43bb3fcfb6 100644--- a/langchain/chains/sql_database/prompt.py+++ b/langchain/chains/sql_database/prompt.py@@ -15,5 +15,5 @@ Only use the following tables:Question: {input}"""PROMPT = Prompt(- input_variables=["input", "table_info", "dialect"], template=_DEFAULT_TEMPLATE,+ input_variables=["input", "table_info", "dialect"], template=_DEFAULT_TEMPLATE)diff --git a/langchain/llms/ai21.py b/langchain/llms/ai21.pyindex 8c4ead4597..3967ca6533 100644--- a/langchain/llms/ai21.py+++ b/langchain/llms/ai21.py@@ -121,7 +121,7 @@ class AI21(BaseModel, LLM):response = requests.post(url=f"https://api.ai21.com/studio/v1/{self.model}/complete",headers={"Authorization": f"Bearer {self.ai21_api_key}"},- json={"prompt": prompt, "stopSequences": stop, **self._default_params,},+ json={"prompt": prompt, "stopSequences": stop, **self._default_params},)if response.status_code != 200:optional_detail = response.json().get("error")diff --git a/langchain/vectorstores/elastic_vector_search.py b/langchain/vectorstores/elastic_vector_search.pyindex a0a623467a..32dd4843b1 100644--- a/langchain/vectorstores/elastic_vector_search.py+++ b/langchain/vectorstores/elastic_vector_search.py@@ -45,7 +45,7 @@ class ElasticVectorSearch(VectorStore):"""def __init__(- self, elasticsearch_url: str, index_name: str, embedding_function: Callable,+ self, elasticsearch_url: str, index_name: str, embedding_function: Callable):"""Initialize with necessary components."""try:diff --git a/tests/integration_tests/llms/test_manifest.py b/tests/integration_tests/llms/test_manifest.pyindex 41c54cc21b..eca4a94b0f 100644--- a/tests/integration_tests/llms/test_manifest.py+++ b/tests/integration_tests/llms/test_manifest.py@@ -6,7 +6,7 @@ def test_manifest_wrapper() -> None:"""Test manifest wrapper."""from manifest import Manifest- manifest = Manifest(client_name="openai",)+ manifest = Manifest(client_name="openai")llm = ManifestWrapper(client=manifest, llm_kwargs={"temperature": 0})output = llm("The capital of New York is:")assert output == "Albany"