-
Notifications
You must be signed in to change notification settings - Fork 168
Open
Description
Hi,
I am manually constructing an AiService like this:
Class<? extends InferenceService> inferenceServiceClass = MyTools.class;
InferenceService service = AiServices.builder(inferenceServiceClass)
.systemMessageProvider(memoryId -> systemPromptDef.renderPrompt())
.chatModel(aiModel.getChatModel())
.chatMemoryProvider(config.getChatMemoryProvider())
.hallucinatedToolNameStrategy((req ->
new ToolExecutionResultMessage(req.id(),req.name(),
"[Tool output omitted due to hallucination]")))
.build();
the inferenceServiceClass is = MyService.class:
public interface InferenceService {
String invoke(String message, String memoryId);
}
@CreatedAware
public interface MyService extends InferenceService {
@ToolBox({
WebSearchTool.class,
MessageRecordTool.class
})
@McpToolBox("mytools")
@Override
String invoke(@UserMessage String message, @MemoryId String memoryId);
}
The mcp tool defined as mytools is properly setup in application.yaml. However this tool is never available. I don't see it being sent in the list of tools to the llm. (the others (websearch/message record) are being sent OK.
I also had to put this @CreatedAware on the interface and I'm not sure why.
thanks!
Metadata
Metadata
Assignees
Labels
No labels