Skip to content

Commit

Permalink
fixup! feat(tools): add llm and calculator tools
Browse files Browse the repository at this point in the history
Signed-off-by: Lukáš Janeček <[email protected]>
  • Loading branch information
Lukáš Janeček committed Dec 13, 2024
1 parent 0cbb53a commit 910c5a6
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@zilliz/milvus2-sdk-node": "^2.4.4",
"ajv": "^8.17.1",
"axios": "^1.7.7",
"bee-agent-framework": "0.0.52",
"bee-agent-framework": "0.0.53",
"bullmq": "^5.32.0",
"bullmq-otel": "^1.0.1",
"cache-manager": "^5.7.6",
Expand Down
33 changes: 16 additions & 17 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/runs/execution/tools/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { SearchToolOptions, SearchToolOutput } from 'bee-agent-framework/tools/s
import { PromptTemplate } from 'bee-agent-framework/template';
import { CalculatorTool } from 'bee-agent-framework/tools/calculator';
import { LLMTool } from 'bee-agent-framework/tools/llm';
import { BaseMessage } from 'bee-agent-framework/llms/primitives/message';

import { AgentContext } from '../execute.js';
import { getRunVectorStores } from '../helpers.js';
Expand Down Expand Up @@ -138,8 +137,7 @@ export async function getTools(run: LoadedRun, context: AgentContext): Promise<F
if (llmUsage)
tools.push(
new LLMTool({
llm: createChatLLM({ model: getDefaultModel() }),
transform: (text) => [new BaseMessage('assistant', text)]
llm: createChatLLM({ model: getDefaultModel() })
})
);

Expand Down
4 changes: 1 addition & 3 deletions src/tools/tools.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import { OpenMeteoTool } from 'bee-agent-framework/tools/weather/openMeteo';
import { ArXivTool } from 'bee-agent-framework/tools/arxiv';
import { PythonTool } from 'bee-agent-framework/tools/python/python';
import { parse } from 'yaml';
import { BaseMessage } from 'bee-agent-framework/llms/primitives/message';

import { Tool as ToolDto } from './dtos/tool.js';
import { AnyTool, Tool, ToolExecutor, ToolType } from './entities/tool/tool.entity.js';
Expand Down Expand Up @@ -468,8 +467,7 @@ function getSystemTools() {
const fileSearch = new FileSearchTool({ vectorStores: [], maxNumResults: 0 });
const readFile = new ReadFileTool({ files: [], fileSize: 0 });
const llmTool = new LLMTool({
llm: createChatLLM({ model: getDefaultModel() }),
transform: (text) => [new BaseMessage('assistant', text)]
llm: createChatLLM({ model: getDefaultModel() })
});
const calculatorTool = new CalculatorTool();

Expand Down

0 comments on commit 910c5a6

Please sign in to comment.