Closed (outdated)
Project:
AI Interpolator OpenAI
Version:
1.0.0-alpha3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2023 at 05:33 UTC
Updated:
12 Nov 2023 at 01:12 UTC
Jump to comment: Most recent
Comments
Comment #2
marcus_johansson commentedThanks fishfree!
The OpenAI module is actually always generating JSON output in the background, that's how it can handle complex fields like location or taxonmy or in general create multiple fields. However this is of course not visible in the frontend. Check the source code.
For instance the FAQ field looks like this
What does exist, and I just pushed the alpha4 for it, is the plugin for the custom field module.
This would can do one-shot learning with provided examples and fill out a complex field. See the video here for an example: https://workflows-of-ai.com/workflow/custom-complex-fields.
What you can do with module currently is many-to-one and one-to-one generation, but not many-to-many. We have private modules for this that we are not ready to open source at the moment.
If you actually want true JSON outputted, we could of course create a OpenAI rule for https://www.drupal.org/project/json_field, that would be easy. Together with this https://www.drupal.org/project/jfu it might do the trick?
If you want that, just change the scope and I'll fix that for you.
For many-to-many of course there could be a community solution for this, but we will probably release the solution sooner or later. If you want to setup that ticket, it probably makes more sense in the ai_interpolator module since it's a structure change in how the module's logic works.
Comment #3
mindaugasd commentedGoing forward (at some point) we will need to figure out one-to-many interpolation (filling multiple fields with a single request).
Connecting a related issue.
Happy to learn about new Custom field. It have not yet existed a year ago I was searching for solution like this.
Comment #4
fishfree commented@Marcus, Thank you for your quick reply.
The module JSON field Utils is not suitable for our problem, and the custom_field is not the native core-built-in fields after all. So implementing this feature in the module ai_interpolator is more reasonable. I'd like to expect that.
Thank you again for your passionate and generous work!
Comment #5
marcus_johansson commentedI will split this up in the tickets:
@fishfree - I hope that was the solution you are looking for, could you close this ticket since the actual multi field is an issue for the Interpolator in general. We could keep it open for the json_field, but since that's not what you were looking for it might make sense to create a separate ticket for that.
Comment #6
fishfree commentedOK. Thank you!