fixbug: unit test

This commit is contained in:
莘权 马 2024-08-07 14:53:37 +08:00
parent f39658db2b
commit 945c24ae15
6 changed files with 17 additions and 9 deletions

View file

@ -5,7 +5,7 @@
@Author : alexanderwu
@File : design_api_an.py
"""
from typing import List,Optional
from typing import List, Optional
from metagpt.actions.action_node import ActionNode
from metagpt.utils.mermaid import MMC1, MMC2
@ -45,7 +45,7 @@ REFINED_FILE_LIST = ActionNode(
example=["main.py", "game.py", "new_feature.py"],
)
#optional,because low success reproduction of class diagram in non py project.
# optional,because low success reproduction of class diagram in non py project.
DATA_STRUCTURES_AND_INTERFACES = ActionNode(
key="Data structures and interfaces",
expected_type=Optional[str],

View file

@ -21,12 +21,12 @@ def make_sk_kernel():
if llm := config.get_azure_llm():
kernel.add_chat_service(
"chat_completion",
AzureChatCompletion(llm.model, llm.base_url, llm.api_key),
AzureChatCompletion(deployment_name=llm.model, base_url=llm.base_url, api_key=llm.api_key),
)
elif llm := config.get_openai_llm():
kernel.add_chat_service(
"chat_completion",
OpenAIChatCompletion(llm.model, llm.api_key),
OpenAIChatCompletion(ai_model_id=llm.model, api_key=llm.api_key),
)
return kernel