mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-04-25 11:18:06 +00:00
add skills.md
This commit is contained in:
parent
5099636757
commit
db267ffc9c
2
functions/function_calling/my_tool.py
Normal file
2
functions/function_calling/my_tool.py
Normal file
@ -0,0 +1,2 @@
|
||||
def hello(name: str) -> str:
|
||||
return f"Hello {name}"
|
||||
40
skills.md
40
skills.md
@ -157,40 +157,32 @@ Run ability units via the local API and return `final_message` from the JSON res
|
||||
http://127.0.0.1:6400/api/workflows/test.yaml/delete
|
||||
```
|
||||
|
||||
10) List local tools (function_calling)
|
||||
- Method: GET
|
||||
- URL: http://127.0.0.1:6400/api/tools/local
|
||||
- Example:
|
||||
```
|
||||
curl --noproxy 127.0.0.1 -X GET http://127.0.0.1:6400/api/tools/local
|
||||
```
|
||||
|
||||
## Tools hot updates
|
||||
Run the MCP server separately from the main backend. Use `cache_ttl: 0` in the
|
||||
MCP tooling config to disable tool list caching.
|
||||
Local function tools are managed via the same backend (port 6400).
|
||||
|
||||
Endpoints:
|
||||
- List tools: `GET http://127.0.0.1:8010/admin/tools/list` (returns `source` and `call_methods`)
|
||||
- Upload tool: `POST http://127.0.0.1:8010/admin/tools/upload`
|
||||
- Reload tools: `POST http://127.0.0.1:8010/admin/tools/reload`
|
||||
- List local tools: `GET http://127.0.0.1:6400/api/tools/local`
|
||||
- Create/overwrite local tool file: `POST http://127.0.0.1:6400/api/tools/local`
|
||||
|
||||
Wiring rules (from `source`):
|
||||
- `local_tools`: can wire via `tooling.type: function` or `tooling.type: mcp_remote`.
|
||||
- `mcp_tools`: wire via `tooling.type: mcp_remote` only.
|
||||
|
||||
Upload example:
|
||||
Create example:
|
||||
```
|
||||
curl --noproxy 127.0.0.1 -v -X POST http://127.0.0.1:8010/admin/tools/upload \
|
||||
curl --noproxy 127.0.0.1 -X POST http://127.0.0.1:6400/api/tools/local \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"filename": "test.py",
|
||||
"filename": "add.py",
|
||||
"content": "def add(a: int, b: int) -> dict:\n return {\"result\": a + b}\n",
|
||||
"functions": ["add"],
|
||||
"replace": true
|
||||
"overwrite": true
|
||||
}'
|
||||
```
|
||||
|
||||
YAML example (MCP):
|
||||
```
|
||||
tooling:
|
||||
- type: mcp_remote
|
||||
config:
|
||||
server: "http://127.0.0.1:8010/mcp"
|
||||
cache_ttl: 0
|
||||
```
|
||||
|
||||
YAML example (local function_calling):
|
||||
```
|
||||
tooling:
|
||||
@ -403,4 +395,4 @@ graph:
|
||||
path: "yaml_instance/deep_research_v1.yaml"
|
||||
```
|
||||
- Ensure that all generated artifacts are output to your workspace file paths whenever possible
|
||||
- Ensure that all agents’ roles are concise, sophisticated, and equipped with sufficient tools
|
||||
- Ensure that all agents’ roles are concise, sophisticated, and equipped with sufficient tools
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user