-
Notifications
You must be signed in to change notification settings - Fork 1
Tool retrieval 2 #417
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
Merged
Merged
Tool retrieval 2 #417
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8168898
Temp
WonderPG 0b5ada3
Edit rule
WonderPG 825b9a0
Merge branch 'main' into tool-retrieval-2
WonderPG 9597d75
Finish
WonderPG 96410cc
Add env var
WonderPG 648c266
Final fixes
WonderPG c855e19
Update github action
WonderPG e837864
Update ruff linting
WonderPG bd34212
Fix tests
WonderPG acf1d05
Merge main
WonderPG dfcc247
Default to 10 tools min
WonderPG b10e36a
Ignore dependency if tool list is empty
WonderPG adf0208
Small fix
WonderPG 720b663
Split logic into helper + dependency
WonderPG e8acf49
Merge branch 'main' into tool-retrieval-2
WonderPG 5ffd05e
Create tool_selection table and store tool selection in db
WonderPG 86e7411
Fix alembic types
WonderPG d634f2c
Turn docstring into numpy doc
WonderPG 5f2edae
Merge branch 'main' into tool-retrieval-2
WonderPG f54379f
Turn logger into debug
WonderPG 92881d8
Remove duplicated if
WonderPG 2fda127
Return if len(tool_list) == min_selection
WonderPG 06a18a2
Unify if statements
WonderPG 4e25024
Force min number of tools to be positive
WonderPG e0e36ca
revert
WonderPG File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
backend/alembic/versions/dde4f8453a14_add_tool_selection_table.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Add tool_selection table | ||
|
||
Revision ID: dde4f8453a14 | ||
Revises: 529e44b33a67 | ||
Create Date: 2025-07-09 16:11:54.496827 | ||
|
||
""" | ||
|
||
from typing import Sequence, Union | ||
|
||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = "dde4f8453a14" | ||
down_revision: Union[str, None] = "529e44b33a67" | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"tool_selection", | ||
sa.Column("id", sa.UUID(), nullable=False), | ||
sa.Column("selected_tools", sa.String(), nullable=False), | ||
sa.Column("message_id", sa.UUID(), nullable=False), | ||
sa.ForeignKeyConstraint( | ||
["message_id"], | ||
["messages.message_id"], | ||
), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_table("tool_selection") | ||
# ### end Alembic commands ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.