Open mihaiav opened 3 months ago
There's nowhere in the API that allows generic file uploads. It's only text and images, within the prompt structure. In order to achieve the effect you want, you will have to either insert all the HTML as text as part of your prompt, or find a way to parse it to extract portions of the HTML (so you can save on tokens).
Also - your temperature is extremely high- which may explain some of the "gibberish". Start with 0.7 and maybe reduce/increase it incrementally.
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
I'm trying to ask openai.GPT4o to analyze a html document/ file and extract keywords but I cannot find how to attach the html document to the prompt request
Describe the solution you'd like A clear and concise description of what you want to happen. A
File
field onopenai.ChatCompletionRequest
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
I've added the html content itself in the prompt but it confuses chatGPT and returns gibberish responses. See the reduced code I've tried: