-
Notifications
You must be signed in to change notification settings - Fork 0
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
V0.1.4 #4
V0.1.4 #4
Conversation
@@ -7,15 +7,15 @@ packages=["ragdaemon"] | |||
|
|||
[project] | |||
name = "ragdaemon" | |||
version = "0.1.3" | |||
version = "0.1.4" |
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.
Version bump in pyproject.toml
matches the version update in ragdaemon/__init__.py
. This ensures consistency across the project.
@@ -1 +1 @@ | |||
__version__ = "0.1.3" | |||
__version__ = "0.1.4" |
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.
Correctly updated the version to 0.1.4
. This change is necessary for version tracking and package management.
from ragdaemon.annotators.chunker_line import ChunkerLine | ||
from ragdaemon.annotators.chunker_llm import ChunkerLLM |
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.
Reordering imports does not affect functionality but adheres to the convention of organizing imports alphabetically. Good for readability and maintenance.
@@ -3,15 +3,15 @@ | |||
from pathlib import Path | |||
|
|||
import networkx as nx | |||
from spice import Spice |
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.
Adding from spice import Spice
directly aligns with the removal of token_counter
from ragdaemon.llm
, centralizing token counting to the Spice
client.
@@ -2,11 +2,12 @@ | |||
from pathlib import Path | |||
|
|||
import networkx as nx | |||
from spice import Spice |
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.
Importing Spice
directly in this file, instead of using a custom token_counter
function, simplifies the codebase by leveraging existing functionality from the Spice
library.
@@ -12,9 +12,9 @@ | |||
from spice import Spice | |||
from starlette.templating import Jinja2Templates | |||
|
|||
from ragdaemon.llm import DEFAULT_COMPLETION_MODEL | |||
from ragdaemon.database import DEFAULT_EMBEDDING_MODEL | |||
from ragdaemon.daemon import Daemon |
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.
Removing unused imports and reordering them improves code cleanliness and readability.
@@ -128,7 +128,9 @@ def get_context( | |||
# TODO: Compare graph hashes, reconcile changes | |||
context = context_builder | |||
include_context_message = context.render() | |||
include_tokens = token_counter(include_context_message) | |||
include_tokens = self.spice_client.count_tokens( |
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.
Using self.spice_client.count_tokens
directly instead of a custom token_counter
function is a good refactor, leveraging the capabilities of the Spice
client for token counting.
@@ -1,10 +1,11 @@ | |||
import os | |||
from pathlib import Path | |||
|
|||
from spice import Spice, SpiceError | |||
from spice import Spice |
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.
Reordering imports and separating from spice.errors import SpiceError
improves the clarity of where specific components are sourced from.
@@ -1,12 +1 @@ | |||
import tiktoken | |||
|
|||
|
|||
DEFAULT_COMPLETION_MODEL = "gpt-4-0125-preview" |
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.
Removing the token_counter
function and its dependencies simplifies the module, especially since token counting is now handled by the Spice
client directly.
@@ -6,7 +6,6 @@ | |||
|
|||
from ragdaemon.errors import RagdaemonError | |||
|
|||
|
|||
mentat_dir_path = Path.home() / ".mentat" |
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.
Removing unnecessary whitespace improves code cleanliness.
@@ -5,7 +5,7 @@ Jinja2==3.1.3 | |||
networkx==3.2.1 | |||
pytest==8.0.2 | |||
pytest-asyncio==0.23.5 | |||
spiceai==0.1.9 | |||
spiceai==0.1.11 |
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.
Updating the spiceai
version in requirements.txt
to 0.1.11
matches the version specified in pyproject.toml
, ensuring consistency in dependency management.
MENTAT CODE REVIEW IN ACTIVE DEVELOPMENT. Only in use on mentat and internal repos. This pull request effectively updates the project version to |
No description provided.