- Install YoMo cli
curl -fsSL https://get.yomo.run | sh
- Start mock server
uvicorn mock_server:app --port 30080
- vivgrid.com
set system prompt
You are a helpful embodied intelligence assistant.Use the supplied tools to assist the user.If the final question is related to the current status of LED and PLC, please look up from the chat history first; and you should call the function "get-image" only if there's no clear answer in chat history.
export VIVGRID_TOKEN="********"
- Run get_image SFN
create a new project with no tools from vivgrid
cd get_image
export YOMO_SFN_CREDENTIAL="app-key-secret:$VIVGRID_TOKEN"
export VIVGRID_TOKEN_WITHOUT_TOOLS="******"
yomo run app.go
curl https://openai.vivgrid.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIVGRID_TOKEN" \
-d '{
"messages": [{"role": "user", "content": "Hi, can you tell what the camera is seeing?"}]
}'
- Run set_plc_output SFN
cd set_plc_output
export YOMO_SFN_CREDENTIAL="app-key-secret:$VIVGRID_TOKEN"
yomo run app.go
curl https://openai.vivgrid.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIVGRID_TOKEN" \
-d '{
"messages": [{"role": "user", "content": "Can you set the PLC output to true?"}]
}'
- Run set_led SFN
cd set_led
export YOMO_SFN_CREDENTIAL="app-key-secret:$VIVGRID_TOKEN"
yomo run app.go
curl https://openai.vivgrid.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $VIVGRID_TOKEN" \
-d '{
"messages": [{"role": "user", "content": "Can you set the display number on the LED to 4005?"}]
}'
- Run the whole process of the chat demo
jupyter-notebook chat.ipynb