Thank you for your efforts. Indeed, my code is quite complex and difficult to understand. This is partly due to the fact that I have not yet worked with almost all of the programming libraries that are used. So with the integration of DeepL I found that the language codes are different from argotranslate. Furthermore the handling of the sources is badly understandable, if one does not know the remaining code / use cases. The sources are about a functionality from the library langchain, namely RetrievalQAWithSourcesChain. The documents themselves have IDs as names and based on the IDs I can later insert arbitrary and detailed sources. Or not, if no sources are defined. But this part is basically not very good, because the langchain functionality doesn’t seem to be very deterministic.
However, this should not be about my project at all. I just added the info so that you get some context to it when reading it.
I unfortunately don’t have the time to look at your tests right now and I noticed that the API parameter documentation is missing? I assume you are using ChatGPT? Basically I guess that with multiple requests better results can be achieved. Maybe one really needs to adjust the own prompting.
My main intention was just to show an example where gpt-4-0314 generates usable code and the current version does not (with the first try). If OpenAI takes feedback from the forum into account (I haven’t found a better place for feedback), I think it’s helpful to show specific examples. I probably should have prepared it better and constructed an easy to understand example from it. Well, in any case a concrete example including concrete API parameters is I think better than no example. Haven’t seen very concrete code examples here on the forum in this regard.