Comments (2)
卸载当前的openai package,然后安装最新版本的openai package
pip uninstall openai
pip install openai --upgrade
在chatgpt.py内, 修改以下的代码
try:
import openai
from openai import AsyncOpenAI
except ImportError:
AsyncOpenAI = None
def __init__(self, check_openai_key = True):
super().__init__()
self.client = AsyncOpenAI()
参考链接:https://pypi.org/project/openai/
from manga-image-translator.
add this code in manga_translator.py line 678
if 'gpt' in key or 'sakura' in key:
continue
like this
async def _init_connection(self):
available_translators = []
from .translators import MissingAPIKeyException, get_translator
for key in TRANSLATORS:
#like this
# ===
if 'gpt' in key or 'sakura' in key:
continue
# ===
try:
get_translator(key)
available_translators.append(key)
except MissingAPIKeyException:
pass
data = {
'nonce': self.nonce,
'capabilities': {
'translators': available_translators,
},
}
requests.post(f'http://{self.host}:{self.port}/connect-internal', json=data)
you can not use gpt and sakura but you can use other models at least
from manga-image-translator.
Related Issues (20)
- [Feature Request]: gp4o mini 來了 HOT 4
- [Bug]: UserScript dont work on Twitter HOT 1
- [Bug]: GPT4o-mini is not GPT4o
- [Feature Request]: Update Sugoi to use Offline Translator API to Leverage the massive V9 performance gains
- [Feature Request]: 增加InternVL 2.0模型 HOT 1
- [Bug]: window无法使用预编译文件安装pydensecrf HOT 1
- [Feature Request]: 希望支持QWEN2
- [Bug]: How to translate same file again in API mode?
- [Feature Request]: web模式下没法选择翻译成泰文
- [Bug]: The GPT Config Reference format in the README document may be incorrect
- [Bug]: Translator invalid HOT 1
- [Bug]: Could not reach translate service
- [Feature Request]: expected rendering performance on GPUs? Documenting GPU and CPU requirements? Number of Python threads?
- [Bug]: colab notebook get error and repeat restart
- [Bug]: ERROR: [batch] ConfigKeyError: Missing key 0 HOT 1
- [Feature Request]: 能否设置或者添加翻译后的字体
- [Feature Request]: Add Groq as an translator service
- [Feature Request]: 是否考虑使用Pango作为漫画的文本排版引擎?
- [Feature Request]: 添加过滤非垂直或水平文本的选项
- [Bug]: where is dbnet_convnext.ckpt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manga-image-translator.