kyma-project / kyma-companion

A tool that brings AI to Kyma
Apache License 2.0
2 stars 11 forks source link

Update Testing Framework to Replace Mock Responses with Real API Calls #139

Closed mfaizanse closed 1 month ago

mfaizanse commented 2 months ago

Description

The testing framework has been developed and integrated into the main pipeline, but the current implementation still relies on mock responses when querying the Kyma Companion. To complete the integration, we need to update the function responsible for querying the Companion to use real API calls. This update should involve two API calls: one to initialize the conversation with the agent, and another to query the agent itself. Additionally, the response must be parsed and passed to the evaluator.

Subtasks

  1. Introduce the new field into scenario YAMLs with the question to the companion:

    • Update YAMLs with scenarios and include there new field called user_query which would represent the request user makes to the companion. For example, "My deployment is failing" or "Why my app is not working"
  2. Implement API Call for Initialization:

    • Develop the functionality to send an API call to initialize the conversation with the Kyma Companion agent.
    • Ensure the initialization request includes the resource_type, resource_name, and namespace as specified in the scenario description.
    • We only use initialization call to initialize conversation with the companion, but we don't use initial questions which were generated for the following requests to the companion. Use user_query field for questions
  3. Implement API Call to Query the Agent:

    • Develop the functionality to send a follow-up API call to query the agent after initialization.
    • Capture the response from the agent and parse it appropriately.
  4. Integrate with Evaluator:

    • Pass the parsed response from the agent to the evaluator for assessment.
    • Ensure that the evaluation process works seamlessly with the real responses instead of mock data.
  5. Testing and Validation:

    • Test the updated framework to ensure that real API calls are functioning correctly and that the entire pipeline—from initialization to evaluation—operates as expected.

Acceptance Criteria

Notes

Teneroy commented 2 months ago

Add new task for supporting switching between different tabs and injecting resources if you are on different tab