Skip to content

Commit

Permalink
More permissive requirements.txt (#43)
Browse files Browse the repository at this point in the history
* Bump versions

* More flexible requirements.txt

* Fix tests

* Revert back test profile for testing
  • Loading branch information
Enias Cailliau committed May 8, 2023
1 parent d5861ec commit 4598bbb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
steamship==2.16.2
langchain==0.0.137
tiktoken==0.2.0
pydantic==1.10.2
steamship~=2.16.4
langchain==0.0.152
5 changes: 4 additions & 1 deletion src/steamship_langchain/cache/cache.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hashlib
import logging
from typing import Dict, Optional
from typing import Any, Dict, Optional

from langchain.cache import RETURN_VAL_TYPE, BaseCache
from langchain.schema import Generation
Expand Down Expand Up @@ -53,6 +53,9 @@ def lookup(self, prompt: str, llm_string: str) -> Optional[RETURN_VAL_TYPE]:
logging.debug(f"cache miss for {prompt}")
return None

def clear(self, **kwargs: Any) -> None:
raise NotImplementedError()

def update(self, prompt: str, llm_string: str, return_val: RETURN_VAL_TYPE) -> None:
"""Update cache based on prompt and llm_string.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ def similarity_search_by_vector(
raise NotImplementedError("similarity_search_by_vector not supported yet.")

def max_marginal_relevance_search(
self, query: str, k: int = 4, fetch_k: int = 20
self, query: str, k: int = 4, fetch_k: int = 20, **kwargs
) -> List[Document]:
raise NotImplementedError("Max marginal relevance search not supported yet.")

def max_marginal_relevance_search_by_vector(
self, embedding: List[float], k: int = 4, fetch_k: int = 20
self, embedding: List[float], k: int = 4, fetch_k: int = 20, **kwargs
) -> List[Document]:
raise NotImplementedError("Max marginal relevance search not supported yet.")

Expand Down

0 comments on commit 4598bbb

Please sign in to comment.