feat: 更新翻译模型
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped
fix:
This commit is contained in:
@@ -90,7 +90,7 @@ def get_response(messages):
|
||||
|
||||
def get_translation_from_llama3(text):
|
||||
start_time = time.time()
|
||||
url = f"http://{settings.A6000_SERVICE_HOST}:11434/api/generate"
|
||||
url = f"http://{settings.A6000_SERVICE_HOST}:12434/api/generate"
|
||||
# url = "http://10.1.1.240:1143/api/generate"
|
||||
|
||||
# prompt = f"System: {prefix_for_llama}\nUser:[{text}]"
|
||||
@@ -103,8 +103,8 @@ def get_translation_from_llama3(text):
|
||||
|
||||
# 创建请求的负载 translator是自定义的翻译模型
|
||||
payload = {
|
||||
"model": "translator",
|
||||
"prompt": f"[{text}]",
|
||||
"model": "AiDA-translator:latest",
|
||||
"prompt": text,
|
||||
"stream": False
|
||||
}
|
||||
# 将负载转换为 JSON 格式
|
||||
@@ -180,7 +180,7 @@ def get_prompt_from_image(image_path, text):
|
||||
|
||||
def main():
|
||||
"""Main function"""
|
||||
text = get_translation_from_llama3("[火焰]")
|
||||
text = get_translation_from_llama3("火焰")
|
||||
print(text)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user