为提高性能,改用c替换原本的flask

This commit is contained in:
2025-09-28 12:02:26 +08:00
parent a0e9bf1b44
commit 3c574e489d
24 changed files with 7240 additions and 0 deletions

24
c/tem/ctl.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef CTL
#define CTL
#include <pthread.h>
#include "tools/log/log.h"
#define MAX_BUF 256
#define HISTORY_BUF 256
#define PROMPT "chatbot$$ "
typedef struct Ctl
{
int (*run)(struct Ctl*,int *);
int (*infifo)(struct Ctl*,const char*);
int index;
char *history[HISTORY_BUF];
pthread_t logwathcher;
log_manager *logmanager;
}Ctl;
Ctl *init_tem(log_manager *logmanager);
#endif