Skip to content

Commit d104ee7

Browse files
authored
Merge branch 'master' into pprados/02-pymupdf
2 parents 0be6c88 + d5360b9 commit d104ee7

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

docs/docs/how_to/tool_results_pass_to_model.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"\n",
1717
":::\n",
1818
"\n",
19-
"Some models are capable of [**tool calling**](/docs/concepts/tool_calling) - generating arguments that conform to a specific user-provided schema. This guide will demonstrate how to use those tool cals to actually call a function and properly pass the results back to the model.\n",
19+
"Some models are capable of [**tool calling**](/docs/concepts/tool_calling) - generating arguments that conform to a specific user-provided schema. This guide will demonstrate how to use those tool calls to actually call a function and properly pass the results back to the model.\n",
2020
"\n",
2121
"![Diagram of a tool call invocation](/img/tool_invocation.png)\n",
2222
"\n",

libs/community/langchain_community/callbacks/openai_info.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
"gpt-3.5-turbo-1106-finetuned": 0.003,
129129
"gpt-3.5-turbo-0125-finetuned": 0.003,
130130
"gpt-4o-mini-2024-07-18-finetuned": 0.0003,
131+
"gpt-4o-mini-2024-07-18-finetuned-cached": 0.00015,
131132
# Fine Tuned output
132133
"babbage-002-finetuned-completion": 0.0016,
133134
"davinci-002-finetuned-completion": 0.012,

libs/community/langchain_community/document_loaders/obs_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def __init__(
9292
self.bucket = bucket
9393
self.key = key
9494

95-
def load(self) -> List[Document]:
95+
def load(self, mode: str = "single") -> List[Document]:
9696
"""Load documents."""
9797
with tempfile.TemporaryDirectory() as temp_dir:
9898
file_path = f"{temp_dir}/{self.bucket}/{self.key}"
@@ -101,5 +101,5 @@ def load(self) -> List[Document]:
101101
self.client.downloadFile(
102102
bucketName=self.bucket, objectKey=self.key, downloadFile=file_path
103103
)
104-
loader = UnstructuredFileLoader(file_path)
104+
loader = UnstructuredFileLoader(file_path, mode=mode)
105105
return loader.load()

libs/core/langchain_core/runnables/utils.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,20 @@ def visit_Attribute(self, node: ast.Attribute) -> Any:
271271
if isinstance(parent, ast.Name):
272272
self.loads.add(parent.id + "." + attr_expr)
273273
self.loads.discard(parent.id)
274+
elif isinstance(parent, ast.Call):
275+
if isinstance(parent.func, ast.Name):
276+
self.loads.add(parent.func.id)
277+
else:
278+
parent = parent.func
279+
attr_expr = ""
280+
while isinstance(parent, ast.Attribute):
281+
if attr_expr:
282+
attr_expr = parent.attr + "." + attr_expr
283+
else:
284+
attr_expr = parent.attr
285+
parent = parent.value
286+
if isinstance(parent, ast.Name):
287+
self.loads.add(parent.id + "." + attr_expr)
274288

275289

276290
class FunctionNonLocals(ast.NodeVisitor):

libs/core/poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "langchain-core"
7-
version = "0.3.29"
7+
version = "0.3.30"
88
description = "Building applications with LLMs through composability"
99
authors = []
1010
license = "MIT"

0 commit comments

Comments
 (0)