Skip to content

Commit

Permalink
v0.7 far
Browse files Browse the repository at this point in the history
  • Loading branch information
yeokm1 committed Apr 8, 2023
1 parent ce59732 commit 32a57e5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ curl --proxy "http://192.168.1.144:8080" https://api.openai.com/v1/chat/completi
* v0.7 (8 Apr 2023):
* * Corrected bug in previous release where previous message/reply memory is not freed after program ends.
* * Now will use one-time malloc allocations of previous message (5000), temp message (5000), GPT reply (8000) buffers to avoid memory fragmentation.
* * Correct memory allocation issue of not using __far when required
* v0.6 (8 Apr 2023):
* * Added new feature to send the previous request and ChatGPT reply to give the model more context in answering the latest request.
* * * Previous request and ChatGPT reply has to be cached
Expand Down
4 changes: 2 additions & 2 deletions doschgpt-code/doschgpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ bool debug_showRawReply = false;

// Message Request
#define SIZE_MSG_TO_SEND 4096
char * messageToSendToNet;
char __far * messageToSendToNet;

#define SIZE_MESSAGE_IN_BUFFER 2048
char * messageInBuffer;
char __far * messageInBuffer;

volatile bool inProgress = true;

Expand Down
10 changes: 5 additions & 5 deletions doschgpt-code/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@

#define TIME_TO_WAIT_AFTER_LAST_FRAME 200

char * api_body_buffer = NULL;
char * sendRecvBuffer = NULL;
char __far * api_body_buffer = NULL;
char __far * sendRecvBuffer = NULL;

char * previousMessage = NULL;
char __far * previousMessage = NULL;
int sizeOfPreviousMessage = 0;
char * previousGPTReply = NULL;
char __far * previousGPTReply = NULL;
int sizeOfPreviousGPTReply = 0;
char * previousTempMessage = NULL;
char __far * previousTempMessage = NULL;

//Network configuration obtained from network_init()
uint16_t startingPort;
Expand Down
Binary file modified releases/v0.7/doschgpt.exe
Binary file not shown.

0 comments on commit 32a57e5

Please sign in to comment.