MCPcopy
hub / github.com/langroid/langroid / agent

Function agent

tests/main/test_file_tools.py:29–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27
28@pytest.fixture
29def agent():
30 cfg = ChatAgentConfig(
31 name="test-write-file",
32 vecdb=None,
33 llm=OpenAIGPTConfig(),
34 use_functions_api=False,
35 use_tools=True,
36 system_message=f"""
37 When asked to read, write or do other operations on files,
38 you MUST use one of the TOOLs:
39 {ReadFileTool.default_value("request")},
40 {WriteFileTool.default_value("request")},
41 {ListDirTool.default_value("request")}
42 Typically a file name or path will be provided, and you should
43 NOT worry about what directory or path it is in. The TOOL will
44 handle that for you.
45 """,
46 )
47 return ChatAgent(cfg)
48
49
50def test_write_file_tool(test_settings: Settings, temp_dir, git_repo, agent):

Callers

nothing calls this directly

Calls 4

ChatAgentConfigClass · 0.90
OpenAIGPTConfigClass · 0.90
ChatAgentClass · 0.90
default_valueMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…