{"messages": [{"role": "system", "content": "", "tools": [{"type": "function", "function": {"name": "get_recommended_books", "description": "Get recommended books based on user's interests", "parameters": {"type": "object", "properties": {"interests": {"type": "array", "items": {"type": "string"}, "description": "The interests to recommend books for"}}, "required": ["interests"]}}}]}, {"role": "user", "content": "Hi, I am looking for some book recommendations. I am interested in history and science fiction."}, {"role": "assistant", "content": "{\"name\": \"get_recommended_books\", \"arguments\": {\"interests\": [\"history\", \"science fiction\"]}}"}, {"role": "observation", "content": "{\"books\": [\"Sapiens: A Brief History of Humankind by Yuval Noah Harari\", \"A Brief History of Time by Stephen Hawking\", \"Dune by Frank Herbert\", \"The Martian by Andy Weir\"]}"}, {"role": "assistant", "content": "Based on your interests in history and science fiction, I would recommend the following books: \"Sapiens: A Brief History of Humankind\" by Yuval Noah Harari, \"A Brief History of Time\" by Stephen Hawking, \"Dune\" by Frank Herbert, and \"The Martian\" by Andy Weir."}]}
{
"messages":[
{
"role":"system",
"content":"",
"tools":[
{
"type":"function",
"function":{
"name":"get_recommended_books",
"description":"Get recommended books based on user's interests",
"parameters":{
"type":"object",
"properties":{
"interests":{
"type":"array",
"items":{
"type":"string"
},
"description":"The interests to recommend books for"
}
},
"required":[
"interests"
]
}
}
}
]
},
{
"role":"user",
"content":"Hi, I am looking for some book recommendations. I am interested in history and science fiction."
"content":"{\"books\": [\"Sapiens: A Brief History of Humankind by Yuval Noah Harari\", \"A Brief History of Time by Stephen Hawking\", \"Dune by Frank Herbert\", \"The Martian by Andy Weir\"]}"
},
{
"role":"assistant",
"content":"Based on your interests in history and science fiction, I would recommend the following books: \"Sapiens: A Brief History of Humankind\" by Yuval Noah Harari, \"A Brief History of Time\" by Stephen Hawking, \"Dune\" by Frank Herbert, and \"The Martian\" by Andy Weir."
@@ -96,6 +91,8 @@ by `export *_MODEL_PATH=/path/to/model`. The models that can be specified includ
...
@@ -96,6 +91,8 @@ by `export *_MODEL_PATH=/path/to/model`. The models that can be specified includ
The Chat model supports reasoning using [vLLM](https://github.com/vllm-project/vllm). To use it, please install vLLM and
The Chat model supports reasoning using [vLLM](https://github.com/vllm-project/vllm). To use it, please install vLLM and
set the environment variable `USE_VLLM=1`.
set the environment variable `USE_VLLM=1`.
The Chat model also supports reasoning using [OpenAI API](https://platform.openai.com/docs/api-reference/introduction). To use it, please run `openai_api_server.py` in `inference` and set the environment variable `USE_API=1`. This function is used to deploy inference server and demo server in different machine.
If you need to customize the Jupyter kernel, you can specify it by `export IPYKERNEL=<kernel_name>`.
If you need to customize the Jupyter kernel, you can specify it by `export IPYKERNEL=<kernel_name>`.
## Usage
## Usage
...
@@ -141,7 +138,7 @@ Users can upload documents and use the long text capability of GLM-4-9B to under
...
@@ -141,7 +138,7 @@ Users can upload documents and use the long text capability of GLM-4-9B to under
pdf and other files.
pdf and other files.
+ Tool calls and system prompt words are not supported in this mode.
+ Tool calls and system prompt words are not supported in this mode.
+ If the text is very long, the model may require a high amount of video memory. Please confirm your hardware
+ If the text is very long, the model may require a high amount of GPU memory. Please confirm your hardware