Просмотр исходного кода

:tada: create ai-translate project(python)

Jeremy Zheng 9 месяцев назад
Родитель
Сommit
83d374dd9a

+ 5 - 0
ai-translate/.gitignore

@@ -0,0 +1,5 @@
+/tmp/
+/config.toml
+
+__pycache__/
+ai_translate.egg-info/

+ 13 - 0
ai-translate/README.md

@@ -0,0 +1,13 @@
+# Usage
+
+```bash
+# initial python3 virtual env
+$ python3 -m venv $HOME/tmp/python3
+# load python3 virtual env
+$ source $HOME/tmp/python3/bin/activate
+# install dependencies
+> python3 -m pip install -e .
+
+> python3 -m ai_translate -h
+> python3 -m ai_translate -c config.toml -n worker-1 -q ai.translate.us
+```

+ 4 - 0
ai-translate/ai_translate/__init__.py

@@ -0,0 +1,4 @@
+
+
+def launch():
+    print('Hello, Mint!')

+ 4 - 0
ai-translate/ai_translate/__main__.py

@@ -0,0 +1,4 @@
+from ai_translate import launch
+
+if __name__ == '__main__':
+    launch()

+ 0 - 0
ai-translate/ai_translate/worker.py


+ 0 - 0
ai-translate/config.orig.toml


+ 16 - 0
ai-translate/pyproject.toml

@@ -0,0 +1,16 @@
+[build-system]
+requires = ["setuptools"]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "ai_translate"
+version = "2025.6.11"
+requires-python = ">= 3.11"
+description = "An OpenAI consumer process"
+readme = "README.md"
+license = "MIT"
+
+dependencies = ["pika", "openai"]
+
+[project.scripts]
+mint-ai-translate-consumer = "ai_translate.__main__:main"