diff --git a/src/test/munit/mulechain-llm-operation-testing-suite.xml b/src/test/munit/langchain-llm-operation-testing-suite.xml similarity index 50% rename from src/test/munit/mulechain-llm-operation-testing-suite.xml rename to src/test/munit/langchain-llm-operation-testing-suite.xml index 8b764fb..846b93d 100644 --- a/src/test/munit/mulechain-llm-operation-testing-suite.xml +++ b/src/test/munit/langchain-llm-operation-testing-suite.xml @@ -8,34 +8,45 @@ http://www.mulesoft.org/schema/mule/munit http://www.mulesoft.org/schema/mule/munit/current/mule-munit.xsd http://www.mulesoft.org/schema/mule/munit-tools http://www.mulesoft.org/schema/mule/munit-tools/current/mule-munit-tools.xsd http://www.mulesoft.org/schema/mule/mulechain http://www.mulesoft.org/schema/mule/mulechain/current/mule-mulechain.xsd"> - + + filePath='${app.home}/envVars.json' + temperature="0.1"/> - - - - - - - - - + + + + + config-ref="OPENAI" prompt="#[payload.data]"> - + + + + + + + + + + + + + + + + - - + \ No newline at end of file diff --git a/src/test/resources/ChatAnswerPrompttest/set-event_payload.dwl b/src/test/resources/ChatAnswerPrompttest/set-event_payload.dwl deleted file mode 100644 index a2a9359..0000000 --- a/src/test/resources/ChatAnswerPrompttest/set-event_payload.dwl +++ /dev/null @@ -1,3 +0,0 @@ -{ - "data": "What is the capital of Switzerland?" -} \ No newline at end of file diff --git a/src/test/resources/ChatAnswerPrompttest/assert_expression_payload.dwl b/src/test/resources/agentdefineprompttemplatetest/assert_expression_payload.dwl similarity index 57% rename from src/test/resources/ChatAnswerPrompttest/assert_expression_payload.dwl rename to src/test/resources/agentdefineprompttemplatetest/assert_expression_payload.dwl index 030cb75..ad1d152 100644 --- a/src/test/resources/ChatAnswerPrompttest/assert_expression_payload.dwl +++ b/src/test/resources/agentdefineprompttemplatetest/assert_expression_payload.dwl @@ -1,4 +1,4 @@ %dw 2.0 import * from dw::test::Asserts --- -payload must contain("Bern") +payload must contain("negative") \ No newline at end of file diff --git a/src/test/resources/agentdefineprompttemplatetest/set-event_attributes.dwl b/src/test/resources/agentdefineprompttemplatetest/set-event_attributes.dwl new file mode 100644 index 0000000..76a169f --- /dev/null +++ b/src/test/resources/agentdefineprompttemplatetest/set-event_attributes.dwl @@ -0,0 +1,28 @@ +{ + "headers": { + "content-type": "application/json", + "user-agent": "PostmanRuntime/7.36.3", + "accept": "*/*", + "postman-token": "10a6a55c-3d90-4164-88cb-d2f787eb55f0", + "host": "localhost:8081", + "accept-encoding": "gzip, deflate, br", + "connection": "keep-alive", + "content-length": "607" + }, + "clientCertificate": null, + "method": "POST", + "scheme": "http", + "queryParams": {}, + "requestUri": "/agent", + "queryString": "", + "version": "HTTP/1.1", + "maskedRequestPath": null, + "listenerPath": "/agent", + "relativePath": "/agent", + "localAddress": "/127.0.0.1:8081", + "uriParams": {}, + "rawRequestUri": "/agent", + "rawRequestPath": "/agent", + "remoteAddress": "/127.0.0.1:61582", + "requestPath": "/agent" +} \ No newline at end of file diff --git a/src/test/resources/agentdefineprompttemplatetest/set-event_payload.dwl b/src/test/resources/agentdefineprompttemplatetest/set-event_payload.dwl new file mode 100644 index 0000000..42ca326 --- /dev/null +++ b/src/test/resources/agentdefineprompttemplatetest/set-event_payload.dwl @@ -0,0 +1,5 @@ +{ + "template": "You are a customer satisfaction agent, who analyzes the customer feedback in the dataset. Answer via json output & add a type for the result only with positive or negative as well as the complete answer", + "instructions": "If the customer feedback in the dataset is negative, open a service satisfaction case and aplogize to the customer. If the customer feedback in the dataset is positive, thank the customer and wish them a nice day. Don't repeat the feedback and be more direct starting the conversation with formal greetings", + "data": "It was a horrible training last week" +} \ No newline at end of file diff --git a/src/test/resources/envVars.json b/src/test/resources/envVars.json index 934b98c..07c7ccb 100644 --- a/src/test/resources/envVars.json +++ b/src/test/resources/envVars.json @@ -6,7 +6,7 @@ "MISTRAL_AI_API_KEY": "" }, "OLLAMA": { - "OLLAMA_BASE_URL": "http://baseurl.ollama.com" + "OLLAMA_BASE_URL": "http://localhost:11434" }, "ANTHROPIC": { "ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY"