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

feat: add tool params #210

Merged
merged 8 commits into from
Apr 24, 2024
Merged

feat: add tool params #210

merged 8 commits into from
Apr 24, 2024

Conversation

0xArdi
Copy link
Collaborator

@0xArdi 0xArdi commented Apr 9, 2024

This PR adds tool params.

@@ -396,7 +399,8 @@ def _prepare_task(self, task_data: Dict[str, Any]) -> None:
executing_task = cast(Dict[str, Any], self._executing_task)
executing_task["timeout_deadline"] = time.time() + self.params.task_deadline
executing_task["tool"] = task_data["tool"]
executing_task["model"] = task_data.get("model", None)
executing_task["model"] = task_data.get("model", tool_params.pop('default_model', None))
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

default model will be picked up here

@@ -11,6 +11,8 @@ fingerprint:
fingerprint_ignore_patterns: []
entry_point: prediction_request_rag_claude.py
callable: run
params:
default_model: claude-3-haiku-20240307
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

any param defined here will be reflected in the metadata stored on-chain

@richardblythman
Copy link
Contributor

@0xArdi should we rebase/merge from main?

fingerprint_ignore_patterns: []
entry_point: prediction_request_rag.py
callable: run
params:
default_model: claude-3-sonnet-20240229
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is this parameter used? At the python file the default model is hard coded

Copy link
Contributor

Choose a reason for hiding this comment

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

You can see in Ardian's comments above.

fingerprint_ignore_patterns: []
entry_point: prediction_request_reasoning.py
callable: run
params:
default_model: claude-3-sonnet-20240229
Copy link
Collaborator

Choose a reason for hiding this comment

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

same question here

temperature: Optional[float] = LLM_SETTINGS[DEFAULT_MODEL]["temperature"],
max_tokens: Optional[int] = LLM_SETTINGS[DEFAULT_MODEL]["default_max_tokens"],
temperature: Optional[float] = LLM_SETTINGS["gpt-4-0125-preview"]["temperature"],
max_tokens: Optional[int] = LLM_SETTINGS["gpt-4-0125-preview"]["default_max_tokens"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

you don't use the same default model as defined in the component.yaml file

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this default can ever be used (was the same before I made the changes). Could change them from optional in future I guess.

@richardblythman richardblythman merged commit 80051bd into main Apr 24, 2024
7 checks passed
@richardblythman richardblythman deleted the feat/tool-param-component branch April 24, 2024 19:13
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.

4 participants