-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: include class user intent. improve dspy user intent to return en…
…um values to drastically reduce output llm tokens making the overall response faster
- Loading branch information
Showing
6 changed files
with
66 additions
and
22 deletions.
There are no files selected for viewing
This file contains 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 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
7 changes: 7 additions & 0 deletions
7
...e-confluence-query-engine/unoplat_code_confluence_query_engine/models/confluence_class.py
This file contains 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,7 @@ | ||
from pydantic import BaseModel, Field | ||
|
||
class CodeConfluenceClass(BaseModel): | ||
class_name: str = Field(default=None, description="The name of the class") | ||
class_summary: str = Field(default=None, description="The summary of the class") | ||
class_objective: str = Field(default=None, description="The objective of the class") | ||
relevance_score: int = Field(default=None, description="The relevance score of the class") |
12 changes: 7 additions & 5 deletions
12
...luence-query-engine/unoplat_code_confluence_query_engine/models/confluence_user_intent.py
This file contains 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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
from enum import Enum | ||
from enum import Enum, auto | ||
|
||
class ConfluenceUserIntent(Enum): | ||
CODE_SUMMARIZATION = "User wants an overview or summary of the codebase." | ||
CODE_FEATURE = "User is looking for specific features that can be answered by going through the package summaries." | ||
FUNCTIONAL_IMPLEMENTATION = "User wants detailed understanding at the function level." | ||
|
||
class ConfluenceUserIntent(str, Enum): | ||
CODE_SUMMARIZATION = auto() | ||
PACKAGE_OVERVIEW = auto() | ||
CLASS_DETAILS = auto() | ||
FUNCTIONAL_IMPLEMENTATION = auto() | ||
|
This file contains 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
15 changes: 9 additions & 6 deletions
15
...query-engine/unoplat_code_confluence_query_engine/unoplat_dspy/intent_detection_module.py
This file contains 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