update llm to qwen

This commit is contained in:
bridge
2025-10-02 17:44:09 +08:00
parent 2d97edca8f
commit c9d51642fb
3 changed files with 4 additions and 1 deletions

View File

@@ -279,7 +279,7 @@ class MoveToAvatar(DefineAction, ActualActionMixin):
target = None
if target is None:
return StepStatus.COMPLETED, []
done = self.avatar.is_in_region(target.tile.region)
done = self.avatar.tile == target.tile
return (StepStatus.COMPLETED if done else StepStatus.RUNNING), []
def finish(self, avatar_name: str) -> list[Event]:

View File

@@ -29,11 +29,13 @@ def call_llm(prompt: str) -> str:
# 从配置中获取模型信息
model_name = CONFIG.llm.model_name
api_key = CONFIG.llm.key
base_url = CONFIG.llm.base_url
# 调用litellm的completion函数
response = completion(
model=model_name,
messages=[{"role": "user", "content": prompt}],
api_key=api_key,
base_url=base_url,
)
# 返回生成的内容

View File

@@ -2,6 +2,7 @@ llm:
# 填入litellm支持的model name和key
model_name: "your-model-name"
key: "your-api-key"
base_url: "your-base-url-of-llm"
paths:
templates: static/templates/