mirror of
https://github.com/yihong0618/bilingual_book_maker.git
synced 2025-07-19 08:30:16 +00:00
parent
ce67920eeb
commit
d85be65266
@ -2,9 +2,9 @@ import re
|
|||||||
import time
|
import time
|
||||||
from copy import copy
|
from copy import copy
|
||||||
from os import environ, linesep
|
from os import environ, linesep
|
||||||
from rich import print
|
|
||||||
|
|
||||||
import openai
|
import openai
|
||||||
|
from rich import print
|
||||||
|
|
||||||
from .base_translator import Base
|
from .base_translator import Base
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ class GPT4(Base):
|
|||||||
)
|
)
|
||||||
|
|
||||||
return openai.ChatCompletion.create(
|
return openai.ChatCompletion.create(
|
||||||
model="gpt-4",
|
model="gpt-4-1106-preview",
|
||||||
messages=messages,
|
messages=messages,
|
||||||
temperature=self.temperature,
|
temperature=self.temperature,
|
||||||
)
|
)
|
||||||
|
@ -1,16 +1,9 @@
|
|||||||
import re
|
from os import linesep
|
||||||
import time
|
|
||||||
from copy import copy
|
|
||||||
from os import environ, linesep
|
|
||||||
from rich import print
|
|
||||||
|
|
||||||
import openai
|
|
||||||
from litellm import completion
|
from litellm import completion
|
||||||
|
|
||||||
from book_maker.translator.chatgptapi_translator import ChatGPTAPI
|
from book_maker.translator.chatgptapi_translator import ChatGPTAPI
|
||||||
|
|
||||||
from .base_translator import Base
|
|
||||||
|
|
||||||
PROMPT_ENV_MAP = {
|
PROMPT_ENV_MAP = {
|
||||||
"user": "BBM_CHATGPTAPI_USER_MSG_TEMPLATE",
|
"user": "BBM_CHATGPTAPI_USER_MSG_TEMPLATE",
|
||||||
"system": "BBM_CHATGPTAPI_SYS_MSG",
|
"system": "BBM_CHATGPTAPI_SYS_MSG",
|
||||||
|
4
setup.py
4
setup.py
@ -3,7 +3,7 @@ from setuptools import find_packages, setup
|
|||||||
|
|
||||||
packages = [
|
packages = [
|
||||||
"bs4",
|
"bs4",
|
||||||
"openai",
|
"openai==0.27.2",
|
||||||
"litellm",
|
"litellm",
|
||||||
"requests",
|
"requests",
|
||||||
"ebooklib",
|
"ebooklib",
|
||||||
@ -17,7 +17,7 @@ packages = [
|
|||||||
setup(
|
setup(
|
||||||
name="bbook_maker",
|
name="bbook_maker",
|
||||||
description="The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt files and books.",
|
description="The bilingual_book_maker is an AI translation tool that uses ChatGPT to assist users in creating multi-language versions of epub/txt files and books.",
|
||||||
version="0.5.0",
|
version="0.5.1",
|
||||||
license="MIT",
|
license="MIT",
|
||||||
author="yihong0618",
|
author="yihong0618",
|
||||||
author_email="zouzou0208@gmail.com",
|
author_email="zouzou0208@gmail.com",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user