Skip to content

Commit 29addac

Browse files
committed
Fix of Issue/Bug#6, Allow arbitrary number of args in Plug-ins
1 parent d4aee09 commit 29addac

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

oai.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919

2020
console = Console()
21-
version = "0.5.0"
21+
version = "0.5.1"
2222
_session_file_ = ".messages.json"
2323

2424
available_parameters = {}
@@ -249,9 +249,10 @@ def main():
249249

250250
#print(openai_response["function_call"]["arguments"].strip())
251251
function_args = json.loads(openai_response["function_call"]["arguments"].strip())
252+
#print("Function arguments")
253+
#print(function_args)
252254
function_response = fuction_to_call(
253-
heading=function_args.get("heading"),
254-
content=function_args.get("content").strip(),
255+
**function_args
255256
)
256257
messages.append(openai_response)
257258
messages.append({"role": "function", "name": function_name, "content": function_response})

0 commit comments

Comments
 (0)