function_call-style JSON response from gpt-4, gpt-3_5, codellama, palm-2-chat-bison

This commit is contained in:
Nicholas Albion
2023-09-23 00:45:23 +10:00
parent 575c25902e
commit 156b361263
5 changed files with 96 additions and 53 deletions

View File

@@ -1,7 +1,7 @@
from local_llm_function_calling.prompter import CompletionModelPrompter, InstructModelPrompter
from const.function_calls import ARCHITECTURE, DEV_STEPS
from .function_calling import parse_agent_response, LlamaInstructPrompter
from .function_calling import parse_agent_response, JsonPrompter
class TestFunctionCalling:
@@ -140,7 +140,7 @@ Function call: '''
def test_llama_instruct_function_prompter_named():
# Given
prompter = LlamaInstructPrompter()
prompter = JsonPrompter()
# When
prompt = prompter.prompt('Create a web-based chat app', ARCHITECTURE['definitions'], 'process_technologies')