Open terralogia opened 1 month ago
Good, but
Write code ...
OpenAI := TOpenAI.Create; OpenAI.Token := 'apikey'; OpenAI.BaseURL := 'https://api.openai.com/v1/';
fil := OpenAI.&File.Upload( procedure (para : TFileUploadParams) begin para.Purpose('assistants'); para.&File('file.pdf');
end
);
ast := TAssistantTool.Create; ast.Add('type', 'code_interpreter');
// Runtime error ... Any idea? asi := OpenAI.Assistants.Create(procedure(params : TAssistantParams) begin params.Instructions('Write resume file pdf'); params.Tools([ast]); params.FileIds(varArrayOf([fil.Id])); end);
It's abstract class
I have updated this part. Pull the changes
Congratulations on the library!
Could you provide an example of how to upload a PDF to the OpenAI API and get a text summary of the content of the PDF?