Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

func_val #96

Open
twoyoungtwosimple opened this issue Oct 14, 2019 · 6 comments
Open

func_val #96

twoyoungtwosimple opened this issue Oct 14, 2019 · 6 comments

Comments

@twoyoungtwosimple
Copy link

image
预定酒店的案例中的hotel_option函数没有在user_function_manager.cpp文件中进行注册?
func_val:hotel_option=service_http_get:hotel_service,/hotel/book?time={%time%}&hotel={%hotel%}&room_type={%room_type%}这个函数是调用的get请求,是不是就不需要在user_function_manager.cpp中注册?那“hotel_option”是需要在哪里配置?

@twoyoungtwosimple
Copy link
Author

请求尽快回复。。

@HuangLK
Copy link

HuangLK commented Oct 14, 2019

hotel_option是变量名,service_http_get:hotel_service,/hotel/book?time={%time%}&hotel={%hotel%}&room_type={%room_type%}是指将service_http_get内置函数的返回值作为变量值,内置函数不需要在user_function_manager.cpp中注册。
其中hotel_service,/hotel/book?time={%time%}&hotel={%hotel%}&room_type={%room_type%}service_http_get的函数参数,这里只是酒店预定案例的参考例子,实际上并不存在可用的hotel_service,配置可查看:

"hotel_service": {

@twoyoungtwosimple
Copy link
Author

hotel_option是变量名,这个变量名在哪引用了呢?这是在这里用了,还有其他地方用吗?

内置函数我看到这个文档里有写:
func_val | 调用开发者定义的函数。用户定义函数位于src/user_function目录下,并需要在user_function_manager.cpp文件中进行注册。value值为","连接的参数,其中第一个元素为函数名,第二个元素开始为函数参数

后面的这个我明白什么意思。service_http_get:hotel_service,/hotel/book?time={%time%}&hotel={%hotel%}&room_type={%room_type%}

@twoyoungtwosimple
Copy link
Author

@HuangLK
Copy link

HuangLK commented Oct 14, 2019

后面流程回复话术“{%location%}附近的酒店有{%hotel_option%},请问你要预订哪一个?”使用了hotel_option 变量

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants