Skip to content

Commit

Permalink
run_code -> execute (function name)
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Oct 27, 2023
1 parent fdf0af3 commit 7f8867f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion interpreter/core/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from ..terminal_interface.terminal_interface import terminal_interface
from ..terminal_interface.validate_llm_settings import validate_llm_settings
from .generate_system_message import generate_system_message
import appdirs
import os
from datetime import datetime
from ..rag.get_relevant_procedures_string import get_relevant_procedures_string
Expand Down
4 changes: 2 additions & 2 deletions interpreter/utils/convert_to_openai_messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def convert_to_openai_messages(messages, function_calling=True):
if "code" in message:
if function_calling:
new_message["function_call"] = {
"name": "run_code",
"name": "execute",
"arguments": json.dumps({
"language": message["language"],
"code": message["code"]
Expand All @@ -37,7 +37,7 @@ def convert_to_openai_messages(messages, function_calling=True):
if function_calling:
new_messages.append({
"role": "function",
"name": "run_code",
"name": "execute",
"content": message["output"]
})
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def test_math():

def test_delayed_exec():
interpreter.chat(
"""Can you write a single block of code and run_code it that prints something, then delays 1 second, then prints something else? No talk just code. Thanks!"""
"""Can you write a single block of code and execute it that prints something, then delays 1 second, then prints something else? No talk just code. Thanks!"""
)

@pytest.mark.skip(reason="This works fine when I run it but fails frequently in Github Actions... will look into it after the hackathon")
Expand Down

0 comments on commit 7f8867f

Please sign in to comment.