You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi and sorry for my ignorance, but I cant make it compile.
In the following code I allways get:
"[dcc32 Error] Unit8.pas(75): E2010 Incompatible types: 'System.SysUtils.TProc<System.TObject,Gemini.Chat.TChat>' and 'Procedure'"
Code:
" {--- Generate text from an image using its Uri. }
Gemini.Chat.AsynCreate('models/gemini-1.5-pro',
procedure (Params: TChatParams)
begin
Params.Contents([TPayload.Add('Describe this image.', [FileUri])]);
end,
function : TAsynChat
begin
Result.Sender := Memo1;
Result.OnSuccess := Display;
Result.OnError := Display;
end); "
Version: Embarcadero RAD Studio 12 Version 29.0.51961.7529
Did I forget something?
I declared " var Gemini := TGeminiFactory.CreateInstance('');" in my FormCreate.
My Units delaration in units section: "... , Gemini, Gemini.Models, Gemini.Chat, Gemini.Embeddings, Gemini.Safety, Gemini.Files;"
Thanks for your time.
The text was updated successfully, but these errors were encountered:
Hi and sorry for my ignorance, but I cant make it compile.
In the following code I allways get:
"[dcc32 Error] Unit8.pas(75): E2010 Incompatible types: 'System.SysUtils.TProc<System.TObject,Gemini.Chat.TChat>' and 'Procedure'"
Code:
" {--- Generate text from an image using its Uri. }
Gemini.Chat.AsynCreate('models/gemini-1.5-pro',
procedure (Params: TChatParams)
begin
Params.Contents([TPayload.Add('Describe this image.', [FileUri])]);
end,
function : TAsynChat
begin
Result.Sender := Memo1;
Result.OnSuccess := Display;
Result.OnError := Display;
end); "
Version: Embarcadero RAD Studio 12 Version 29.0.51961.7529
Did I forget something?
I declared " var Gemini := TGeminiFactory.CreateInstance('');" in my FormCreate.
My Units delaration in units section: "... , Gemini, Gemini.Models, Gemini.Chat, Gemini.Embeddings, Gemini.Safety, Gemini.Files;"
Thanks for your time.
The text was updated successfully, but these errors were encountered: