Huanshere / Huanshere/VideoLingo

这个项目的一些局限性

Open
#441 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
18.5k
Forks
2k
Avg merge
7h 41m
Merged PRs (30d)
12

Description

目前使用的prompt不是强制的 json 格式输出,虽然在 prompt 已经描述强制使用 json 格式输出

Image

但是实际测试中发现,即使重试 3 次,仍然会有可能出现返回的格式不是预期的,这就导致以下的几个问题:

  1. 重试次数过多,导致 token 量暴涨,叠加上每次调用都会带上的 prompt,即使我使用的是 gemini 2.5 flash 这种很便宜的模型,一个 2 小时不到的翻译量 token 都超过了 100万,非常不值,这里面大多数花费在了重试上
  2. 三次有时候是不够的,这就导致返回中断,尤其在长视频翻译上,中断概率飙升,几乎没有什么可用性

希望能够改为 json 严格化输出的格式,不是基于 prompt 的强制,而是官方本身就已经提供的 strict mode

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the translation calls and their retry handling, then check how the configured Gemini model can request an official strict JSON response. Done means responses reliably match the expected JSON format, unnecessary retries and token usage are reduced, and long-video translation no longer stops because of repeated format failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, localization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.