- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 377
Feature/gsk 2334 talk to my model mvp #1889
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
Conversation
…-2334-talk-to-my-model-mvp
…-2334-talk-to-my-model-mvp
…ich returns a prediction from the row of the dataset.
… is called. Replaced placeholders and dummy variables to the real objects.
…-2334-talk-to-my-model-mvp
…skard-AI/giskard into feature/gsk-2335-query-prediction-for-the-row-from-the-dataset
…flow. Performed prompt engineering for the tool description and LLM instruction.
…-2334-talk-to-my-model-mvp
…-2335-query-prediction-for-the-row-from-the-dataset
…skard-AI/giskard into feature/gsk-2335-query-prediction-for-the-row-from-the-dataset
…ction-for-the-row-from-the-dataset Implementation of the "PredictFromDatasetTool"
…-2334-talk-to-my-model-mvp
…skard-AI/giskard into feature/gsk-2336-query-shap-prediction-explanation
…-to-tools' of github.com:Giskard-AI/giskard into feature/gsk-2336-query-shap-prediction-explanation
…-to-tools' of github.com:Giskard-AI/giskard into feature/gsk-2334-talk-to-my-model-mvp
…skard-AI/giskard into feature/gsk-2336-query-shap-prediction-explanation
…prediction-explanation Feature/gsk 2336 query shap prediction explanation
…common for all child Tools classes.
…-to-tools' of github.com:Giskard-AI/giskard into feature/gsk-2419-adapt-workflow-to-the-tools-api
| } | ||
|  | ||
| @staticmethod | ||
| def _gather_context(message_list: list) -> str: | 
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.
Could be nice to check that the resulting string is not too long for the context windows of the LLM
…b.com/Giskard-AI/giskard into feature/gsk-2334-talk-to-my-model-mvp
        
          
                giskard/llm/talk/config.py
              
                Outdated
          
        
      | def get_talk_llm_model() -> str: | ||
| return os.getenv("GSK_TALK_LLM_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.
This is unused I think, we can remove it
        
          
                giskard/llm/client/copilot.py
              
                Outdated
          
        
      | class ToolChatMessage(ChatMessage): | ||
| name: Optional[str] = None | ||
| tool_call_id: Optional[str] = None | ||
| tool_calls: Optional[list] = None | 
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.
nitpick, could be more precise: Optional[list[ChatCompletionMessageToolCall]]
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.
I'll add it, I forget if adding a typing based on a conditional imports create troubles (even if put under quotes), I'll try it.
| tool_calls: Optional[list] = None | ||
|  | ||
|  | ||
| def _format_message(msg: ChatMessage) -> dict: | 
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.
should be ToolChatMessage type
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.
actually for this one, it's ChatMessage, but what GiskardCopilotClient.complete returns is ToolChatMessage
        
          
                giskard/models/base/model.py
              
                Outdated
          
        
      | **TALK_CLIENT_CONFIG, | ||
| ) | ||
|  | ||
| if content := response.content: | 
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.
I don't get the use of walrus here
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.
yeah good catch, it would've been useful if these where properties with lazy loading of sorts, but no both of these are just simple attributes. I fixed it.
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.
Generally LGTM, just minor comments
| 
 | 



Description
Related Issue
Type of Change
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.pdm.lockrunningpdm update-lock(only applicable whenpyproject.tomlhas beenmodified)