-
Notifications
You must be signed in to change notification settings - Fork 138
add param type date and date-picker #324
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -87,6 +87,8 @@ class ToolParameterType(StrEnum): | |
| OBJECT = CommonParameterType.OBJECT.value | ||
| ARRAY = CommonParameterType.ARRAY.value | ||
| DYNAMIC_SELECT = CommonParameterType.DYNAMIC_SELECT.value | ||
| DATE = CommonParameterType.DATE.value | ||
| DATE_PICKER = CommonParameterType.DATE_PICKER.value | ||
|
Comment on lines
+90
to
+91
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding DATE and DATE_PICKER to ToolParameterType without updating the translation logic in ToolSelector.to_prompt_message (lines 361-375) will cause issues with LLM tool calling. Most LLM providers (e.g., OpenAI) do not support "date" or "date-picker" as valid JSON Schema types. These should ideally be mapped to "string" (potentially with a "format": "date") when generating the schema for the LLM. |
||
|
|
||
| class ToolParameterForm(Enum): | ||
| SCHEMA = "schema" # should be set while adding tool | ||
|
|
||
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.
The new DATE and DATE_PICKER types are added to CommonParameterType but are not included in the ProviderConfig.Config inner enum (lines 90-98). This omission prevents these types from being used in provider credentials or configuration schemas. For full consistency as a "Common" type, they should be exposed there as well.