Skip to content

wujunzhuo/yomo-function-calling

Repository files navigation

yomo-function-calling

Download chatglm model Or Use Azure OpenAI Service

curl -o chatglm3-ggml.bin "https://www.modelscope.cn/api/v1/models/tiansz/chatglm3-6b-ggml/repo?Revision=master&FilePath=chatglm3-ggml.bin"

Or

export AZURE_OPENAI_ENDPOINT=https://c3y.openai.azure.com/
export AZURE_OPENAI_KEY=******

Install python libs

sudo apt install python3-virtualenv
virtualenv venv
source venv/bin/activate

pip install chatglm_cpp fastapi pydantic uvicorn openai

Compile YoMo Source

go build -o source_exec ./source

Start python server

python fc_server.py

Start YoMo Zipper

yomo serve -c zipper-config.yaml

Start application SFN

cd sfn-get-weather
go run main.go

Start sink SFN

cd sfn-sink
go run main.go

Chat as YoMo Source

curl -H "Content-type: application/json" -d '{"prompt":"北京的天气怎么样?"}' http://localhost:2880
# {"msg":"ok","tag":50,"payload":"{\"city_name\": \"\\u5317\\u4eac\"}"}

curl -H "Content-type: application/json" -d '{"prompt":"你叫什么名字?"}' http://localhost:2880
# {"msg":"error: This prompt cannot be recognized as a function"}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published