Open
Conversation
Author
|
Here example, how to check the service: using GoogleCloud
const DEFAULT_REGION = "us-central1"
const CREDENTIALS = JSONCredentials("credentials.json")
const GOOGLE_SESSION = GoogleSession(CREDENTIALS, ["cloud-platform"])
set_session!(text_service, GOOGLE_SESSION)
model_params = (
temperature=0.7,
maxOutputTokens=200,
topP=0.7,
topK=40
)
params = Dict(
:instances => [
Dict(:prompt => "Tell about yourself")
],
:parameters => model_params
)
response = text_service(
:PALM,
:predict,
DEFAULT_REGION,
CREDENTIALS.project_id,
DEFAULT_REGION,
GoogleCloud.BISON_TEXT_MODEL_NAME,
data=params
) |
|
Hi @quinnj or @mattBrzezinski would either of you be able to take a look at this? Thanks! |
quinnj
reviewed
Dec 9, 2023
Member
quinnj
left a comment
There was a problem hiding this comment.
Looks fine? Is there any way to add some kind of test? Just to ensure it can load even?
|
@quinnj for real testing here we need an active API KEY. I think it is possible to add some tests if there is a way to enable real use of API KEY in CI. Otherwise, only mock tests with examples of data to be returned are possible. E.g. this way we use for tests with external OpenAI API calls - https://github.com/OpenSesame/GptSearchPlugin/blob/main/test/helpers/mocking.jl#L7-L18 . |
Member
|
Yeah, I was thinking just mock tests would be great. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Feature: Api root for working with Vertex AI