Skip to content

Conversation

Moncefmd
Copy link

The list_applications tool showed unfiltered results even when a search term was provided, resulting in huge token consumption (especially in setups with very large amount of apps like mine). The underlying Argo CD API does not support filtering, so this PR adds server-side filtering after fetching the list.

The way it currently kind of works is that the LLM receives the full list of apps and then the LLM filters it out. This way is much more efficient and allows for filtering for more than just application name.

This was tested on my instance and works very well on filtering only the relevant information.

Feel free to give feedback and review :)


public async listApplications(params?: { search?: string }) {
const { body } = await this.client.get<V1alpha1ApplicationList>(`/api/v1/applications`, params);
public async listApplications(filters?: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we still need to use filters parameter in request

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants