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

Not working using text prompt with Palm2 Google Vertex API #826

Open
rmonteiro89 opened this issue May 28, 2024 · 1 comment
Open

Not working using text prompt with Palm2 Google Vertex API #826

rmonteiro89 opened this issue May 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rmonteiro89
Copy link

rmonteiro89 commented May 28, 2024

Hi,

I tried to use this tool using the provider vertex:text-bison@002 as the config file below:

# Learn more: https://promptfoo.dev/docs/configuration/guide
description: 'Testing'

prompts:
  - 'Convert this English to {{language}}: {{input}}'

providers:
  - id: vertex:text-bison@002
    config:
      generationConfig:
        temperature: 0.4
        maxOutputTokens: 1024
        topP: 0.95

tests:
  - vars:
      language: Portuguese
      input: Hello my old friend!

It returned the error:

"status":400,"code":400,"errors":[{"message":"Invalid instance: input has an instance that's missing a prompt field","domain":"global","reason":"badRequest"}]

Checking the source code, it looks like this tool only works for the Palm2 Chat API.

Is it intentional, or could I open a PR to fix/add it?

Edit:
it looks like it is a simple change https://cloud.google.com/vertex-ai/generative-ai/docs/text/test-text-prompts.

@typpo
Copy link
Collaborator

typpo commented May 29, 2024

Not intentional, just not yet implemented! Would definitely accept a PR to handle text completions.

@typpo typpo added the bug Something isn't working label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants