Skip to content
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

Merged
merged 3 commits into from
Jun 6, 2023
Merged

🧠 Small memory updates #718

merged 3 commits into from
Jun 6, 2023

Conversation

asim-shrestha
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Jun 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2023 6:51pm
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2023 6:51pm

@vercel vercel bot temporarily deployed to Preview – docs June 6, 2023 18:16 Inactive
@@ -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"
Copy link
Member

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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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(
Copy link
Member

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()
Copy link
Member

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

@vercel vercel bot temporarily deployed to Preview – docs June 6, 2023 18:51 Inactive
@asim-shrestha asim-shrestha merged commit 9348eea into main Jun 6, 2023
@asim-shrestha asim-shrestha deleted the memory branch June 6, 2023 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants