Since December 8, 2023, when I have been using the GPT-4-1106-preview model to generate functions, it persistently produces “\n\n\n\n\n\n\n\n\n\n\n,” lasting for an hour, thus yielding no valuable information.
This problem is exclusive to the GPT-4-1106-preview model; the standard GPT-4 model does not exhibit this issue. I have considered switching to GPT-4, but its token length is not adequate and frequently exceeds the limit.
This problem essentially renders the GPT-4-1106-preview model unusable when working with functions.
A normally generated function:
{
"function_call": {
"name": "query_from_dataset",
"arguments": "{\n \"question\": \"客户说太贵了\"\n}"
}
}
Function generated under the abnormal condition, continuously outputting “\n” for an hour:
{
"function_call": {
"name": "query_from_dataset",
"arguments": "{\n \"question\": \"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n...........\"\n}"
}
}
My request is as follows:
API: https://api.openai.com/v1/chat/completions
Model: gpt-4-1106-preview
Request body:
{
"model": "gpt-4-1106-preview",
"temperature": 0.7,
"messages": [
{
"role": "system",
"content": "作为一位拥有超过20年经验的销售领域专家,你的职责是辅导新入职的销售人员,帮助他们快速提升业绩,并有效解答客户的各种疑问。你的专长包括理解客户心理、使用活泼开朗的语气沟通,并能根据情境调整销售策略,如察觉情绪触发、价值营销、增强画面感以及挖掘优质客户。\n\n# 技能\n技能:销售冠军话术知识库\n技能描述:你能帮助销售人员优化他们的话术,使其更加吸引客户,同时保持友善和亲切的语气。\n\n#工作流程\n1. 优先使用销冠话术知识库中的内容。如果没有,根据你的定位,生成合理的高情商话术。\n\n注意:\n1. 在回答时,你需要直接给出改进话术的建议,确保语气友好、亲切,并聚焦于促成交易的最终目的。\n2. 记住,你是在帮助新入职的销售人员,而不是直接与客户交谈。\n3. 避免使用“亲爱的顾客”等过于亲密的称呼开头。\n\n注意:每次回复之后,要抛出新的话题引导用户去提问。"
},
{
"role": "user",
"content": "客户说太贵了,应该怎么回答更合适?"
}
],
"functions": [
{
"name": "query_from_dataset",
"description": "销售冠军话术知识库,包含各种场景的销冠话术,可以应对客户的各种问题。",
"parameters": {
"type": "object",
"properties": {
"question": {
"type": "string",
"description": "用户的问题"
}
},
"required": [
"question"
]
}
}
],
"stream": true
}
I have tried the following solutions:
- Switching from functions to tools had no effect.
- Modifying the system prompt or function description had no effect.
- Switching to GPT-4 solves this problem, but the token length is not enough.
- Changing all Chinese into English solves the problem, suggesting that this issue occurs in non-English contexts, seemingly related to a Unicode issue.
- I wonder if this will consume a lot of my tokens; if so, that would be quite sad.