mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 19:12:42 +00:00
model laboratory (#95)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""Test functionality related to natbot."""
|
||||
|
||||
from typing import List, Optional
|
||||
from typing import Any, List, Mapping, Optional
|
||||
|
||||
from langchain.chains.natbot.base import NatBotChain
|
||||
from langchain.llms.base import LLM
|
||||
@@ -16,6 +16,10 @@ class FakeLLM(LLM):
|
||||
else:
|
||||
return "bar"
|
||||
|
||||
@property
|
||||
def _identifying_params(self) -> Mapping[str, Any]:
|
||||
return {}
|
||||
|
||||
|
||||
def test_proper_inputs() -> None:
|
||||
"""Test that natbot shortens inputs correctly."""
|
||||
|
@@ -1,6 +1,6 @@
|
||||
"""Unit tests for ReAct."""
|
||||
|
||||
from typing import List, Optional, Union
|
||||
from typing import Any, List, Mapping, Optional, Union
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -35,6 +35,10 @@ class FakeListLLM(LLM):
|
||||
self.i += 1
|
||||
return self.responses[self.i]
|
||||
|
||||
@property
|
||||
def _identifying_params(self) -> Mapping[str, Any]:
|
||||
return {}
|
||||
|
||||
|
||||
class FakeDocstore(Docstore):
|
||||
"""Fake docstore for testing purposes."""
|
||||
|
@@ -1,5 +1,5 @@
|
||||
"""Fake LLM wrapper for testing purposes."""
|
||||
from typing import List, Mapping, Optional
|
||||
from typing import Any, List, Mapping, Optional
|
||||
|
||||
from langchain.llms.base import LLM
|
||||
|
||||
@@ -19,3 +19,7 @@ class FakeLLM(LLM):
|
||||
return "foo"
|
||||
else:
|
||||
return "bar"
|
||||
|
||||
@property
|
||||
def _identifying_params(self) -> Mapping[str, Any]:
|
||||
return {}
|
||||
|
Reference in New Issue
Block a user