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

Feature/move to langgraph #883

Merged
merged 21 commits into from
Jul 30, 2024
Merged

Feature/move to langgraph #883

merged 21 commits into from
Jul 30, 2024

Conversation

jamesrichards4
Copy link
Contributor

Context

We should make use of the new Redbox class which is based on LangGraph to simplify the Redbox interface and create a library which is separate from the API to enable other uses and better experimentation

Changes proposed in this pull request

Create a simple class Redbox which wraps the Langgraph work. Use this object in core-api in place of the current runnables.

Replace the testing in core-api with the TestCases setup from redbox-core

Things to check

  • I have added any new ENV vars in all deployed environments
  • I have tested any code added or changed
  • I have run integration tests

):
"""REST endpoint. Get a mapping of all tools available via chat."""
return [{"name": name, "description": tool[1]} for (name, tool) in routable_chains.items()]
return [{"name": name, "description": description} for name, description in redbox.get_available_keywords().items()]


@chat_app.websocket("/rag")
Copy link
Collaborator

Choose a reason for hiding this comment

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

@@ -1,3 +1,7 @@
"""Redbox is a Python library for working with the Redbox API, data and services."""

from redbox.app import Redbox

__version__ = "0.3.0"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
__version__ = "0.3.0"
__version__ = "0.5.0"

parameterised_retriever: VectorStoreRetriever = None,
tokeniser: Encoding = None,
env: Settings = None,
debug: bool = False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

note-to-self: settings that define:

  • llm
  • all_chunks_retriever
  • parameterised_retriever
  • tokeniser
    should be the settings that are injected into the request and not in env = Settings

)


def get_embeddings(env: Settings) -> Embeddings:
Copy link
Collaborator

Choose a reason for hiding this comment

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

pleased to see this moved here and out of its own file

Copy link
Collaborator

@gecBurton gecBurton left a comment

Choose a reason for hiding this comment

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

happy - lets fix forward

@jamesrichards4 jamesrichards4 merged commit 4513eed into main Jul 30, 2024
6 of 7 checks passed
@gecBurton gecBurton deleted the feature/move-to-langgraph branch October 29, 2024 15:48
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