py3.9 compat

This commit is contained in:
Nuno Campos
2024-01-21 09:12:18 -08:00
parent bd6490443f
commit 150583bd40
2 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ import time
import warnings
from concurrent.futures import ThreadPoolExecutor
from contextlib import contextmanager
from typing import Annotated, Generator, Optional, Self, TypedDict, Union
from typing import Annotated, Generator, Optional, TypedDict, Union
import pytest
from langchain_core.runnables import RunnablePassthrough
@@ -983,7 +983,7 @@ def test_prebuilt_chat() -> None:
from langchain_core.messages import AIMessage, FunctionMessage, HumanMessage
class FakeFuntionChatModel(FakeMessagesListChatModel):
def bind_functions(self, functions: list) -> Self:
def bind_functions(self, functions: list):
return self
@tool()
@@ -1129,7 +1129,7 @@ def test_message_graph() -> None:
from langchain_core.messages import AIMessage, FunctionMessage, HumanMessage
class FakeFuntionChatModel(FakeMessagesListChatModel):
def bind_functions(self, functions: list) -> Self:
def bind_functions(self, functions: list):
return self
@tool()
+2 -3
View File
@@ -9,7 +9,6 @@ from typing import (
AsyncIterator,
Generator,
Optional,
Self,
TypedDict,
Union,
)
@@ -1030,7 +1029,7 @@ async def test_prebuilt_chat() -> None:
from langchain_core.messages import AIMessage, FunctionMessage, HumanMessage
class FakeFuntionChatModel(FakeMessagesListChatModel):
def bind_functions(self, functions: list) -> Self:
def bind_functions(self, functions: list):
return self
@tool()
@@ -1179,7 +1178,7 @@ async def test_message_graph() -> None:
from langchain_core.messages import AIMessage, FunctionMessage, HumanMessage
class FakeFuntionChatModel(FakeMessagesListChatModel):
def bind_functions(self, functions: list) -> Self:
def bind_functions(self, functions: list):
return self
@tool()