-
Notifications
You must be signed in to change notification settings - Fork 80
Closed
Description
Hi,
When I try to use stream mode using the example in ChatGPT_Console.dproj I have the error below
[dcc32 Error] ChatGPT_Console.dpr(68): E2010 Incompatible types: 'TChatEvent' and 'Procedure'
OpenAI.Chat.CreateStream(
procedure(Params: TChatParams)
begin
Params.Messages([TchatMessageBuild.User(Buf.Text)]);
Params.MaxTokens(1024);
Params.Stream;
end,
procedure(Chat: TChat; IsDone: Boolean; var Cancel: Boolean)
begin
if (not IsDone) and Assigned(Chat) then
Writeln(Chat.Choices[0].Delta.Content)
else if IsDone then
Writeln('DONE!');
Writeln('-------');
Sleep(100);
end);Metadata
Metadata
Assignees
Labels
No labels