()
| 27 | |
| 28 | @pytest.fixture |
| 29 | def 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 | |
| 50 | def test_write_file_tool(test_settings: Settings, temp_dir, git_repo, agent): |
nothing calls this directly
no test coverage detected
searching dependent graphs…