tensorlakeai / indexify

A realtime and indexing and structured extraction engine for Unstructured Data to build Generative AI Applications
https://getindexify.ai
Apache License 2.0
703 stars 77 forks source link

`POST /namespaces/{}/extraction_graphs` returns 200 on conflict #695

Closed grampelberg closed 3 weeks ago

grampelberg commented 3 weeks ago

The real problem here is that the original graph is not updated with the new values.

If we're being pedantic, I'd expect a 400 from this and a PUT /namespaces/{}/extraction_graphs/{} to be used for updates.

If we're going for something a little bit more usable from the client side, updating the definition would be a nice behavior.

I'm not sure which way I'd go. Being pedantic would likely be good long-term, that'll allow us to version the extraction graphs and then provide endpoints for latest vs older graphs depending on integrations. That said, it is a larger surface area for clients to manage.

maxkozlovsky commented 3 weeks ago

Yes I see the code returns success for an existing graph ignoring the updates. I'll fix it to return error code for now to remove the surprising behavior, and implement update of an existing graph eventually.

maxkozlovsky commented 3 weeks ago

fixed in #701