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

All number of maxSteps are always executed with Google Vertex AI even when it leads to repetition #3470

Open
mauricekleine opened this issue Nov 4, 2024 · 2 comments

Comments

@mauricekleine
Copy link

Description

When using the vertexProvider (import { createVertex } from '@ai-sdk/google-vertex';) and setting maxSteps to any number, streamText always runs exactly the number of maxSteps defined, even if it leads to repetitive tool calls with the same arguments

Code example

No response

Additional context

No response

@lgrammel
Copy link
Collaborator

lgrammel commented Nov 7, 2024

can you share the tools you're using?

@mauricekleine
Copy link
Author

mauricekleine commented Nov 7, 2024

@lgrammel they're tools that call other LLMs, like so:

export const myTool = tool({
	description: "...",
	execute: async (args) => {
		const result = await generateText({
			model: vertex,
			prompt: "..."
			system: "..."
		});

		return { text: result.text };
	},
	parameters: z.object({ ... })
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants