Skip to content

Commit 592d98a

Browse files
MaxiDonkey@hotmail.comMaxiDonkey@hotmail.com
authored andcommitted
Issue 19
1 parent bf57cfe commit 592d98a

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

source/MistralAI.Chat.pas

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,9 @@ procedure TChatRoute.AsyncCreateStream(ParamProc: TProc<TChatParams>;
12341234
following processing}
12351235
LocalChat.Free;
12361236
end;
1237-
end);
1237+
end)
1238+
else
1239+
LocalChat.Free;
12381240
end
12391241
else
12401242
if IsDone then

source/MistralAI.Codestral.pas

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,9 @@ procedure TCodestralRoute.AsyncCreateStream(ParamProc: TProc<TCodestralParams>;
839839
following processing}
840840
LocalCode.Free;
841841
end;
842-
end);
842+
end)
843+
else
844+
LocalCode.Free;
843845
end
844846
else
845847
if IsDone then

source/MistralAI.Types.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ class function TRepositoryTypeHelper.Create(
16251625
begin
16261626
var index := IndexStr(Value.ToLower, ['github']);
16271627
if index = -1 then
1628-
raise Exception.Create(' Invalid repository value.');
1628+
raise Exception.Create('Invalid repository value.');
16291629
Result := TRepositoryType(index);
16301630
end;
16311631

0 commit comments

Comments
 (0)