Add support for Google AI as an LLM #416
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes made
The PR adds support for Google AI as an LLM in addition to OpenAI and HuggingFace. It makes the necessary changes to the UI that one can select Google's AI platform from the TestSpark UI. The main contribution is the handling of Google's API to send a prompt to the AI model and retrieve its answer.
Why is merge request needed
Users might also want to use Google's AI platform for test generation with TestSpark.
Other notes
This merge request is part of the assignment I've received from @pderakhshanfar.
What is missing?
Tests are currently disabled because they rely on an API key, which should probably not be part of the TestSpark code base. The tests now require an environment variable called
GOOGLE_API_KEY
to be set, such that they run.