my prompt in chatgpt web site is work fine:
please translate the following title to Japanese:
"Intel claims Panther Lake will achieve 5x performance increase"
and use normal chat completion api is also work:
{"model":"gpt-4-0125-preview",
"messages":[{"role":"user","content":"please translate the following title to Japanese:'Intel claims Panther Lake will achieve 5x performance increase'"}]}
but when use API function calling,gpt always return the origin title, and never do what i want to do.
I need help !
following is the json sent to gpt:
{"model":"gpt-4-0125-preview",
"messages":[{"role":"user","content":"please translate the following title to Japanese: 'Intel claims Panther Lake will achieve 5x performance increase'"}],
"tools":[{"type":"function",
"function":{"name":"get_article","description":"get_article","parameters":{"type":"object","properties":{"title":{"type":"string","description":"japanese title"}},"required":["title"]}}}],
"tool_choice":{"type":"function","function":{"name":"get_article"}}}