docs: add a simple chat client for example (#119)
1. optimize the readme in root 2. add example Signed-off-by: jokemanfire <hu.dingyang@zte.com.cn>
This commit is contained in:
parent
31da5ff02d
commit
2125698fdc
1 changed files with 733 additions and 12 deletions
15
examples/simple-chat-client/README.md
Normal file
15
examples/simple-chat-client/README.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
# Simple Chat Client
|
||||
|
||||
A simple chat client implementation using the Model Context Protocol (MCP) SDK. It just a example for developers to understand how to use the MCP SDK. This example use the easiest way to start a MCP server, and call the tool directly. No need embedding or complex third library or function call(because some models can't support function call).Just add tool in system prompt, and the client will call the tool automatically.
|
||||
|
||||
|
||||
## Config
|
||||
the config file is in `src/config.toml`. you can change the config to your own.Move the config file to `/etc/simple-chat-client/config.toml` for system-wide configuration.
|
||||
|
||||
## Usage
|
||||
|
||||
After configuring the config file, you can run the example:
|
||||
```bash
|
||||
cargo run --bin simple-chat
|
||||
```
|
||||
|
||||
Loading…
Reference in a new issue