Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Google AI as an LLM #416

Open
wants to merge 7 commits into
base: development
Choose a base branch
from

Conversation

stephanlukasczyk
Copy link

@stephanlukasczyk stephanlukasczyk commented Nov 24, 2024

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.

  • I have checked that I am merging into correct branch

To run the tests you need to retrieve an API key from Google's AI
Platform, set it to the apiKey variable and remove the @disabled
annotation from the test class.
@stephanlukasczyk stephanlukasczyk marked this pull request as ready for review November 24, 2024 20:08
Every model retrieved from the API is prefixed by `models/` which does
not add any value to the user, thus we remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant