-
Notifications
You must be signed in to change notification settings - Fork 16
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 text_service #57
base: master
Are you sure you want to change the base?
Add text_service #57
Conversation
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! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 . |
Yeah, I was thinking just mock tests would be great. |
Feature: Api root for working with Vertex AI