1) Use UserConfig to change system default LLM model name

2)  Support GPT4-Turbo JSON resp format
This commit is contained in:
Liu Zhicong
2023-11-13 16:07:33 -08:00
parent 763360b305
commit 5fe3073cb6
6 changed files with 86 additions and 27 deletions
+3
View File
@@ -237,7 +237,9 @@ class LLMResult:
def __init__(self) -> None:
self.state : str = "ignore"
self.resp : str = ""
self.raw_resp = None
self.paragraphs : dict[str,FunctionItem] = []
self.post_msgs : List[AgentMsg] = []
self.send_msgs : List[AgentMsg] = []
@@ -257,6 +259,7 @@ class LLMResult:
llm_json = json.loads(llm_json_str)
r.state = llm_json.get("state")
r.resp = llm_json.get("resp")
r.raw_resp = llm_json
post_msgs = llm_json.get("post_msg")
r.post_msgs = []