-
Notifications
You must be signed in to change notification settings - Fork 28
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
Introduce framework to automatically generate doc for agents #504
Conversation
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.
One problem is that here we are getting ghe information from the "runtime part", but the configuration is primarly handled on the planner side, so with AgentNodeProvider
We should also cover the resources, the asserts, the datasource/vector-database stuff and the AI providers
@@ -26,4 +28,6 @@ public interface AgentCodeProvider { | |||
* @return the new AgentCode | |||
*/ | |||
AgentCode createInstance(String agentType); | |||
|
|||
Collection<String> getSupportedAgentTypes(); |
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.
why do we need this ?
configuration | ||
.getOrDefault("endpoint", "http://minio-endpoint.-not-set:9090") | ||
.toString(); | ||
String username = configuration.getOrDefault("access-key", "minioadmin").toString(); |
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 an old style agent, now all the new code uses ConfigurationUtils, how can we deal with it ? move everything to ObjectMapper ?
d28d09e
to
46ebf48
Compare
Thanks @eolivelli I moved everything to use the AgentNodeProvider's instead of the runtime API. |
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.
LGTM
drop-fields
ands3-source
in this pr). A java class must be defined using new annotations to describe the properties.Given a class, the process is the following:
com.github.victools:jsonschema-generator
. This perfectly handles all the typings, including objects, collections and nested typesrequired
,description
,defaultValue
name
anddescription
for the agent. thetype
is inferred.The validation will then validate the required field.
Example class for S3 source:
The result is the following: