mirror of
https://gitee.com/Vancouver2017/luban-lite.git
synced 2025-12-29 01:06:56 +00:00
v1.2.1
This commit is contained in:
@@ -13,8 +13,9 @@
|
||||
#include "./module/thread_pool.h"
|
||||
|
||||
#define THREADPOOL_MAX 3
|
||||
#define WIFI_NAME NULL
|
||||
#define WIFI_PASSWORD NULL
|
||||
#define WIFI_NAME "xxx"
|
||||
#define WIFI_PASSWORD "xxx"
|
||||
|
||||
typedef struct _lv_llm_msg
|
||||
{
|
||||
int type;
|
||||
@@ -52,6 +53,9 @@ void ui_init(void)
|
||||
{
|
||||
llm_config_load(LLM_DEEPSEEK_V3, NULL);
|
||||
|
||||
extern void llm_font_create(void);
|
||||
llm_font_create();
|
||||
|
||||
lv_obj_t *llm_scr = lv_obj_create(NULL);
|
||||
lv_obj_clear_flag(llm_scr, LV_OBJ_FLAG_SCROLLABLE);
|
||||
chat_ui_create(llm_scr);
|
||||
@@ -194,8 +198,8 @@ void wifi_config_init(const char *wifi_name, const char *password)
|
||||
static void llm_msg_init(void)
|
||||
{
|
||||
task_req_mq = rt_mq_create("task_req_mq",
|
||||
1024,
|
||||
sizeof(lv_llm_msg_t),
|
||||
128,
|
||||
RT_IPC_FLAG_FIFO);
|
||||
if (!task_req_mq) {
|
||||
LV_LOG_ERROR("Failed to create request message queue");
|
||||
@@ -203,8 +207,8 @@ static void llm_msg_init(void)
|
||||
}
|
||||
|
||||
ui_resp_mq = rt_mq_create("ui_resp_mq",
|
||||
1024,
|
||||
sizeof(lv_llm_msg_t),
|
||||
128,
|
||||
RT_IPC_FLAG_FIFO);
|
||||
if (!ui_resp_mq) {
|
||||
LV_LOG_ERROR("Failed to create response message queue");
|
||||
|
||||
@@ -18,6 +18,7 @@ enum {
|
||||
LLM_TONGYI_QWQ32B,
|
||||
LLM_DOUBAO_1_5_256k,
|
||||
LLM_DOUBAO_1_5_32k,
|
||||
LLM_TYPE_MAX,
|
||||
};
|
||||
typedef int llm_type_t;
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ char *llm_generate_response(llm_config_t *config)
|
||||
}
|
||||
strcat(newAllContent, config->content_buffer);
|
||||
allContent = newAllContent;
|
||||
printf("%s", config->content_buffer);
|
||||
// printf("%s", config->content_buffer);
|
||||
free(oldAllContent);
|
||||
|
||||
if (config->callback)
|
||||
|
||||
@@ -34,9 +34,9 @@ thread_pool_t *thread_pool_create(int thread_count)
|
||||
if (!pool) return NULL;
|
||||
|
||||
pool->task_mq = rt_mq_create("tpool_mq",
|
||||
2048,
|
||||
sizeof(thread_pool_task_t),
|
||||
RT_IPC_FLAG_FIFO);
|
||||
sizeof(thread_pool_task_t),
|
||||
128,
|
||||
RT_IPC_FLAG_FIFO);
|
||||
if (!pool->task_mq) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -24,9 +24,6 @@ static lv_obj_t *wifi_img;
|
||||
|
||||
lv_obj_t *chat_ui_create(lv_obj_t *parent)
|
||||
{
|
||||
extern void llm_font_create(void);
|
||||
llm_font_create();
|
||||
|
||||
lv_obj_t *chat_obj = lv_obj_create(parent);
|
||||
lv_obj_remove_style_all(chat_obj);
|
||||
lv_obj_clear_flag(chat_obj, LV_OBJ_FLAG_SCROLL_CHAIN);
|
||||
|
||||
Reference in New Issue
Block a user