mirror of
https://github.com/kennethreitz/langchain.git
synced 2026-06-05 23:00:18 +00:00
@@ -1,6 +1,6 @@
|
||||
"""Unit tests for ReAct."""
|
||||
|
||||
from typing import List, Optional, Tuple
|
||||
from typing import List, Optional, Union
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -39,10 +39,10 @@ class FakeListLLM(LLM):
|
||||
class FakeDocstore(Docstore):
|
||||
"""Fake docstore for testing purposes."""
|
||||
|
||||
def search(self, search: str) -> Tuple[str, Optional[Document]]:
|
||||
def search(self, search: str) -> Union[str, Document]:
|
||||
"""Return the fake document."""
|
||||
document = Document(page_content=_PAGE_CONTENT)
|
||||
return document.summary, document
|
||||
return document
|
||||
|
||||
|
||||
def test_predict_until_observation_normal() -> None:
|
||||
|
||||
Reference in New Issue
Block a user