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

[ai] You cannot provide both 'inputs' and 'input' when calling generateEmbeddings #1232

Open
hrasoa opened this issue Mar 10, 2025 · 0 comments
Labels

Comments

@hrasoa
Copy link

hrasoa commented Mar 10, 2025

Describe the bug
A clear and concise description of what the bug is.

const gpt4Ai = createRAGClient(client, {
  model: 'gpt-4-turbo-preview',
});

  const embendings = await gpt4Ai.generateEmbeddings({
    inputs: ['Coding'],
    model: 'text-embedding-3-small',
  });

This code throws:

Error: {"message": "You cannot provide both 'inputs' and 'input'. Please provide 'inputs'; 'input' has been deprecated.", "type": "BadRequestError"}
    at RAGClient.generateEmbeddings (/Users/x/Developer/apps/boobook/node_modules/.pnpm/@[email protected][email protected]/node_modules/@gel/ai/dist/core.js:146:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async run (/Users/x/Developer/apps/boobook/apps/api/src/db/debug.db.ts:14:22)

Looks like there is an issue here:

      body: JSON.stringify({
        ...request,
        input: request.inputs,
      }),

Versions:

  • OS: MacOS 15.3.1 (24D70)
  • Gel version: 6.2+f715a89
  • Gel CLI version: Gel CLI 7.0.3+79e11b7
  • gel version: 2.0.0
  • Node/Deno version: Node.js v22.11.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants