-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🧠 Small memory updates #718
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
platform/pyproject.toml
Outdated
@@ -12,8 +12,8 @@ readme = "README.md" | |||
|
|||
[tool.poetry.dependencies] | |||
python = "^3.9" | |||
fastapi = "^0.96.0" | |||
uvicorn = { version = "^0.22.0", extras = ["standard"] } | |||
fastapi = "^0.95.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this
self, query: str, score_threshold: float = 0.7 | ||
) -> SimilarTasks: | ||
# Get similar tasks | ||
results = self._similarity_search_with_score(query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
results = self._similarity_search_with_score(query) | |
results: Tuple[str, float] = self._similarity_search_with_score(query) |
results = self._similarity_search_with_score(query) | ||
|
||
# Sort by score | ||
results.sort(key=lambda x: x[1], reverse=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
results.sort(key=lambda x: x[1], reverse=True) | |
results.sort(key=sort_by_id, reverse=True) |
logger.error(error) | ||
|
||
# Recreate _similarity_search_with_score from langchain to use a near vector | ||
def _similarity_search_with_score( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add this to langchain!
from reworkd_platform.web.api.memory.memory import SimilarTasks | ||
from reworkd_platform.web.api.memory.weaviate import WeaviateMemory | ||
|
||
router = APIRouter() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This router should have an admin only dependancy
No description provided.