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

[FEATURE] UX: handle tool misconfiguration better #983

Open
langchain4j opened this issue Apr 19, 2024 · 3 comments
Open

[FEATURE] UX: handle tool misconfiguration better #983

langchain4j opened this issue Apr 19, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request P2 High priority

Comments

@langchain4j
Copy link
Owner

langchain4j commented Apr 19, 2024

In the following case, when tools is a class, not an object, we should do a better job handling this situation.

AiServices.builder(Assistant.class)
                .tools(Tools.class)
                .build();

Exception should be thrown if (one of) the provided object(s) is a Class.

@langchain4j langchain4j added the enhancement New feature or request label Apr 19, 2024
@langchain4j langchain4j changed the title [FEATURE] UX: handle tool configuration better [FEATURE] UX: handle tool misconfiguration better Apr 19, 2024
@langchain4j langchain4j added the P2 High priority label Apr 19, 2024
@anunnakian
Copy link

If we try to create an object when we have a Class as a parameter. Do we have to handle the following case too ?

AiServices.builder(Assistant.class)
                .tools(Tools.class, tools2, tools3)
                .build();

@langchain4j
Copy link
Owner Author

@anunnakian after a second thought, I am not sure it is a good idea to introduce another reflexion usage, I would rather just throw an exception if the provided object is a Class

@anunnakian
Copy link

Got it! could you assign this issue to me, I'll make a PR at the end of the day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P2 High priority
Projects
None yet
Development

No branches or pull requests

2 participants