Skip to content

Commit eb89157

Browse files
committed
misc comment cleanup
1 parent 25c6ab2 commit eb89157

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Source/LlamaCore/Private/LlamaNative.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ FLlamaNative::FLlamaNative()
1616
{
1717
const FString Token = FLlamaString::ToUE(TokenPiece);
1818

19-
//Accumalate
19+
//Accumulate
2020
CombinedPieceText += Token;
2121

2222
FString Partial;

Source/LlamaCore/Public/Internal/LlamaInternal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class FLlamaInternal
5252
//continue generating from last stop
5353
std::string ResumeGeneration();
5454

55-
//delete the last message and tries again
55+
//Feature todo: delete the last message and try again
5656
//std::string RerollLastGeneration();
5757

5858
std::string WrapPromptForRole(const std::string& Text, EChatTemplateRole Role, const std::string& OverrideTemplate, bool bAddAssistantBoS = false);

Source/LlamaCore/Public/LlamaNative.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include "LlamaDataTypes.h"
66
#include "CoreMinimal.h"
7-
//#include "LlamaNative.generated.h"
87

98

109
/**
@@ -45,10 +44,10 @@ class LLAMACORE_API FLlamaNative
4544
//if you've queued up a lot of BG tasks, you can clear the queue with this call
4645
void ClearPendingTasks(bool bClearGameThreadCallbacks = false);
4746

48-
//tick forward for safely consuming game thread messages without hanging
47+
//tick forward for safely consuming game thread messages
4948
void OnGameThreadTick(float DeltaTime);
50-
void AddTicker(); //optional if you don't forward ticks from e.g. component tick
51-
void RemoveTicker(); //if you use AddTicker, use remove ticker to balance on exit. Will happen on destruction of native component.
49+
void AddTicker(); //optional call this once if you don't forward ticks from e.g. component/actor tick
50+
void RemoveTicker(); //if you use AddTicker, use remove ticker to balance on exit. Will happen on destruction of FLlamaNative if not called earlier.
5251
bool IsNativeTickerActive();
5352

5453
//Context change - not yet implemented
@@ -68,11 +67,11 @@ class LLAMACORE_API FLlamaNative
6867
FLlamaNative();
6968
~FLlamaNative();
7069

71-
float ThreadIdleSleepDuration = 0.005f; //5ms sleep timer for BG thread'
70+
float ThreadIdleSleepDuration = 0.005f; //default sleep timer for BG thread in sec.
7271

7372
protected:
7473

75-
//can be safely called on game thread or the bg thread, handles either logic
74+
//can be safely called on game thread or the bg thread
7675
void SyncModelStateToInternal(TFunction<void()>AdditionalGTStateUpdates = nullptr);
7776

7877
//utility functions, only safe to call on bg thread
@@ -84,7 +83,7 @@ class LLAMACORE_API FLlamaNative
8483
FLLMModelParams ModelParams;
8584
FLLMModelState ModelState;
8685

87-
//BG State
86+
//BG State - do not read/write on GT
8887
FString CombinedPieceText; //accumulates tokens into full string during per-token inference.
8988

9089
//Threading

0 commit comments

Comments
 (0)