Skip to content

Commit ffb766a

Browse files
attt
1 parent 616e5d0 commit ffb766a

File tree

8 files changed

+12
-90
lines changed

8 files changed

+12
-90
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ keys.txt
55
*.o
66
assets/lua_src.lua
77
*.ko
8+
build.sh
89
macros.encrypt_key.h
910
vgcore*
1011
RagCraft

build/main.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ function main()
2525
return
2626
end
2727

28+
create_lua_src()
2829

2930
local encrypt_key = darwin.argv.get_flag_arg_by_index({ "encrypt_key"}, 1)
3031
if not encrypt_key then
@@ -35,7 +36,6 @@ function main()
3536
create_encrypt_key(encrypt_key)
3637

3738
Install_dependencies()
38-
create_lua_src()
3939
create_assets()
4040
silver_chain_organize()
4141

main.lua

Lines changed: 0 additions & 5 deletions
This file was deleted.

prompt.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/config/macros.app.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "../imports/imports.dep_declare.h"
66
//silver_chain_scope_end
77

8-
const char *VERSION ="0.0.1";
8+
const char *VERSION ="0.0.2";
99
const char *NAME_CHAT = "RagCraft";
1010

1111

src/encrypt_key.h

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/extra/macros.extra.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define release_if_not_null(ptr, releaser) if(ptr != NULL){releaser(ptr);}
1010

1111

12-
#if defined(__win32__) || defined(_WIN32) || defined(WIN32)
12+
#if defined(_win32)
1313
#define PTR_CAST long long
1414
#else
1515
#define PTR_CAST long

src/lua_raw_methods/llm/fdefine.llm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//silver_chain_scope_end
77

88
LuaCEmbedResponse *add_user_prompt(LuaCEmbedTable *self, LuaCEmbed *args){
9-
OpenAiInterface *openAi = (OpenAiInterface *)lua_n.tables.get_long_prop(self,"openAi");
9+
OpenAiInterface *openAi = (OpenAiInterface *)(PTR_CAST)lua_n.tables.get_long_prop(self,"openAi");
1010
char *prompt = lua_n.args.get_str(args,0);
1111
if(lua_n.has_errors(args)){
1212
return lua_n.response.send_error(lua_n.get_error_message(args));
@@ -16,7 +16,7 @@ LuaCEmbedResponse *add_user_prompt(LuaCEmbedTable *self, LuaCEmbed *args){
1616
}
1717

1818
LuaCEmbedResponse *add_system_prompt(LuaCEmbedTable *self, LuaCEmbed *args){
19-
OpenAiInterface *openAi = (OpenAiInterface *)lua_n.tables.get_long_prop(self,"openAi");
19+
OpenAiInterface *openAi = (OpenAiInterface *)(PTR_CAST)lua_n.tables.get_long_prop(self,"openAi");
2020

2121
char *prompt = lua_n.args.get_str(args,0);
2222
if(lua_n.has_errors(args)){
@@ -28,7 +28,7 @@ LuaCEmbedResponse *add_system_prompt(LuaCEmbedTable *self, LuaCEmbed *args){
2828
}
2929

3030
LuaCEmbedResponse *add_assistant_prompt(LuaCEmbedTable *self, LuaCEmbed *args){
31-
OpenAiInterface *openAi = (OpenAiInterface *)lua_n.tables.get_long_prop(self,"openAi");
31+
OpenAiInterface *openAi = (OpenAiInterface *)(PTR_CAST)lua_n.tables.get_long_prop(self,"openAi");
3232

3333
char *prompt = lua_n.args.get_str(args,0);
3434
if(lua_n.has_errors(args)){
@@ -38,7 +38,7 @@ LuaCEmbedResponse *add_assistant_prompt(LuaCEmbedTable *self, LuaCEmbed *args){
3838
return NULL;
3939
}
4040
LuaCEmbedResponse *make_question(LuaCEmbedTable *self, LuaCEmbed *args){
41-
OpenAiInterface *openAi = (OpenAiInterface *)lua_n.tables.get_long_prop(self,"openAi");
41+
OpenAiInterface *openAi = (OpenAiInterface *)(PTR_CAST)lua_n.tables.get_long_prop(self,"openAi");
4242

4343
OpenAiResponse *response = OpenAiInterface_make_question_finish_reason_treated(openAi);
4444
if(openai.response.error(response)){
@@ -49,7 +49,7 @@ LuaCEmbedResponse *make_question(LuaCEmbedTable *self, LuaCEmbed *args){
4949
}
5050

5151
LuaCEmbedResponse *delete_llm(LuaCEmbedTable *self, LuaCEmbed *args){
52-
UniversalGarbage *garbage = (UniversalGarbage *)lua_n.tables.get_long_prop(self,"garbage");
52+
UniversalGarbage *garbage = (UniversalGarbage *)(PTR_CAST)lua_n.tables.get_long_prop(self,"garbage");
5353
UniversalGarbage_free(garbage);
5454
return NULL;
5555
}
@@ -85,7 +85,7 @@ char *vibe_callback_handler(cJSON *args, void *pointer){
8585
return json_response_str;
8686
}
8787
LuaCEmbedResponse *add_function(LuaCEmbedTable *self, LuaCEmbed *args){
88-
OpenAiInterface *openAi = (OpenAiInterface *)lua_n.tables.get_long_prop(self,"openAi");
88+
OpenAiInterface *openAi = (OpenAiInterface *)(PTR_CAST)lua_n.tables.get_long_prop(self,"openAi");
8989
char *name = lua_n.args.get_str(args,0);
9090
char *description = lua_n.args.get_str(args,1);
9191
LuaCEmbedTable *parameters = lua_n.args.get_table(args,2);
@@ -107,7 +107,7 @@ LuaCEmbedResponse *add_function(LuaCEmbedTable *self, LuaCEmbed *args){
107107
return lua_n.response.send_error(lua_n.get_error_message(args));
108108
}
109109
}
110-
DtwStringArray *functionsNames = (DtwStringArray *)lua_n.tables.get_long_prop(self,"functionsNames");
110+
DtwStringArray *functionsNames = (DtwStringArray *)(PTR_CAST)lua_n.tables.get_long_prop(self,"functionsNames");
111111
if(dtw.string_array.find_position(functionsNames,name) != -1){
112112
return lua_n.response.send_error("Function already exists");
113113
}
@@ -129,7 +129,7 @@ LuaCEmbedResponse *add_function(LuaCEmbedTable *self, LuaCEmbed *args){
129129
dtw.randonizer.free(randonizer);
130130
}
131131

132-
UniversalGarbage *garbage = (UniversalGarbage *)lua_n.tables.get_long_prop(self,"garbage");
132+
UniversalGarbage *garbage = (UniversalGarbage *)(PTR_CAST)lua_n.tables.get_long_prop(self,"garbage");
133133
UniversalGarbage_add(garbage,dtw.string_array.free,functionsNames);
134134

135135
lua_n.args.generate_arg_clojure_evalation(args,3,"function(callback)\n %s = callback end\n",public_name);

0 commit comments

Comments
 (0)