mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-07-28 00:48:10 +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}"
|
||||||
38
skills.md
38
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
|
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
|
## Tools hot updates
|
||||||
Run the MCP server separately from the main backend. Use `cache_ttl: 0` in the
|
Local function tools are managed via the same backend (port 6400).
|
||||||
MCP tooling config to disable tool list caching.
|
|
||||||
|
|
||||||
Endpoints:
|
Endpoints:
|
||||||
- List tools: `GET http://127.0.0.1:8010/admin/tools/list` (returns `source` and `call_methods`)
|
- List local tools: `GET http://127.0.0.1:6400/api/tools/local`
|
||||||
- Upload tool: `POST http://127.0.0.1:8010/admin/tools/upload`
|
- Create/overwrite local tool file: `POST http://127.0.0.1:6400/api/tools/local`
|
||||||
- Reload tools: `POST http://127.0.0.1:8010/admin/tools/reload`
|
|
||||||
|
|
||||||
Wiring rules (from `source`):
|
Create example:
|
||||||
- `local_tools`: can wire via `tooling.type: function` or `tooling.type: mcp_remote`.
|
|
||||||
- `mcp_tools`: wire via `tooling.type: mcp_remote` only.
|
|
||||||
|
|
||||||
Upload 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" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{
|
-d '{
|
||||||
"filename": "test.py",
|
"filename": "add.py",
|
||||||
"content": "def add(a: int, b: int) -> dict:\n return {\"result\": a + b}\n",
|
"content": "def add(a: int, b: int) -> dict:\n return {\"result\": a + b}\n",
|
||||||
"functions": ["add"],
|
"overwrite": true
|
||||||
"replace": 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):
|
YAML example (local function_calling):
|
||||||
```
|
```
|
||||||
tooling:
|
tooling:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user