4 comments (4 comments)0 reactions (0 reactions)0 assignees (0 assignees)Python6,557 stars (6,557 stars)978 forks (978 forks)batch import
good first issue
Description
如题,官方发布了一个接口使用token的统计工具,不知道能否整合进去,每次翻译前显示一下大概要消耗的资费。
感谢作者!
Contributor guide
- Tech stack
- python
- Domain
- cli
- Issue type
- feature
- DifficultyEstimated implementation difficulty for a new contributor, from 1 for very small changes to 5 for expert-level work.
- 3
- Estimated timeA rough time range for an experienced contributor to investigate, implement, test, and prepare a pull request.
- 1-3 hours
- Activity statusHow available the issue appears right now: fresh, active, stale, blocked, or waiting on maintainer input.
- needs maintainer response
- ClarityHow clearly the issue explains the expected change, acceptance criteria, and next step.
- unclear
- Prerequisites
- PythonOpenAI API
- Newbie friendlinessA 1-100 score estimating how approachable this issue is for first-time contributors.
- 40
- Research direction
- This issue requests integrating an official token usage API from OpenAI to display translation cost before translating. To implement, investigate OpenAI's usage endpoint (likely api.openai.com/v1/usage or similar), calculate cost based on model and token count, and display it to the user. The existing API call logic is in the main translation function. The maintainer should confirm the desired implementation path.