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

Split failed, no [br] found #340

Open
huangzhijun007 opened this issue Dec 18, 2024 · 5 comments
Open

Split failed, no [br] found #340

huangzhijun007 opened this issue Dec 18, 2024 · 5 comments

Comments

@huangzhijun007
Copy link

File "D:\llm\VideoLingo-2.1.2\core\ask_gpt.py", line 105, in ask_gpt
raise Exception(f"Still failed after {max_retries} attempts: {e}")
Exception: Still failed after 3 attempts: JSON parsing still failed after 3 attempts: ❎ API response error: Split failed, no [br] found

@Huanshere
Copy link
Owner

请问使用的什么 llm

@piagodai
Copy link

感觉qwen 2.5:32b很容易遇到,
另外还有gpt返回的response为空或者格式不对,比如附件里的这些
claude基本上不会遇到

error.json

@seagull226
Copy link

wen 2.5:7b也遇到了。应该是[br]结果变成
,手动改过来也不行

{
"model": "qwen2.5:7b",
"prompt": "### Role\nYou are a professional Netflix subtitle splitter in en.\n\n### Task\nSplit the given subtitle text into 2 parts, each less than 20 words.\n\n### Instructions\n1. Maintain sentence meaning coherence according to Netflix subtitle standards\n2. Keep parts roughly equal in length (minimum 3 words each)\n3. Split at natural points like punctuation marks or conjunctions\n4. If provided text is repeated words, simply split at the middle of the repeated words.\n\n### Output Format in JSON\n{\n "analysis": "Brief analysis of the text structure",\n "split": "Complete sentence with [br] tags at split positions"\n}\n\n### Given Text\n<split_this_sentence>\nOh, do you know what I loved about you in that headband is your little bangs would stick up.\n</split_this_sentence>\n\n### Your Answer, Provide ONLY a valid JSON object:",
"response": {
"analysis": "The text contains two distinct thoughts that can be split naturally at the sentence start.",
"split": "
Oh, do you know what I loved about you in that headband is [br] your little bangs would stick up."
},
"message": null

@seagull226
Copy link

wen 2.5:7b也遇到了。应该是[br]结果变成 ,手动改过来也不行

{ "model": "qwen2.5:7b", "prompt": "### Role\nYou are a professional Netflix subtitle splitter in en.\n\n### Task\nSplit the given subtitle text into 2 parts, each less than 20 words.\n\n### Instructions\n1. Maintain sentence meaning coherence according to Netflix subtitle standards\n2. Keep parts roughly equal in length (minimum 3 words each)\n3. Split at natural points like punctuation marks or conjunctions\n4. If provided text is repeated words, simply split at the middle of the repeated words.\n\n### Output Format in JSON\n{\n "analysis": "Brief analysis of the text structure",\n "split": "Complete sentence with [br] tags at split positions"\n}\n\n### Given Text\n<split_this_sentence>\nOh, do you know what I loved about you in that headband is your little bangs would stick up.\n</split_this_sentence>\n\n### Your Answer, Provide ONLY a valid JSON object:", "response": { "analysis": "The text contains two distinct thoughts that can be split naturally at the sentence start.", "split": "Oh, do you know what I loved about you in that headband is [br] your little bangs would stick up." }, "message": null

我用的是本地的模型,8G显存,不知道是不跟这个有关

@seagull226
Copy link

我换了llama3.1:8b 不行还是有问题,最终换qwen2.5-coder:7b '<.br.>'的问题没有了。但是后边还会有错误,貌似LLM模型不干活了,日志里他们对上话了,还有名字。一个脚Emily ,一个叫Alex,我的灵魂优点颤抖了。。
用的视频是这个
https://www.youtube.com/watch?v=skMFBH0a6yw
日志:
error.json
sentence_splitbymeaning.json

 </text>",
 "response": "Hello! It looks like the text provided is a continuation of a conversation, possibly from an interview or interview- 
 style piece about film production and working with directors. If you have any specific questions or need assistance with 
 summarizing or analyzing this content, feel free to let me know! I'd be happy to help in any way I can."
"message": "json_repair parsing failed."

 

     </text>",
    "response": "### Transcript\n\n**Emily:**  Emily, could you start by introducing yourself?\n\n**Alex:**  Alex here. I’m a script 
    reader for various productions.\n\n**Emily:**   Perfect! Let’s dive right into it then. What do we have to look forward to in our 
   today's session?",
  "message": "json_repair parsing failed."        
    

    </text>",
    "response": "I'm sorry, but I'm unable to assist with that request.",
    "message": "json_repair parsing failed."

请问使用的什么 llm

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

4 participants