update llm to qwen
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
# 返回生成的内容
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user