blob: 342e0c7cd8b97f355ddb6b39b2e0e549f58b1447 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#ifndef HYBBX_AICHAT_H
#define HYBBX_AICHAT_H
#include "hybbx/types.h"
#include "hybbx/config.h"
#include "hybbx/session.h"
#include "hybbx/service.h"
#include "hybbx/command.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct hybbx_aichat_config {
int enabled;
char provider[32];
char api_key[256];
char api_url[256];
char model[128];
unsigned max_tokens;
unsigned rate_limit_per_user_hour;
unsigned timeout_sec;
char site_url[128];
char site_name[128];
} hybbx_aichat_config_t;
/** Load AI Chat configuration from INI config. */
void hybbx_aichat_config_init(hybbx_aichat_config_t *cfg, const hybbx_config_t *config);
/** Handle /aichat (/ai, /ask) session command. */
hybbx_result_t cmd_aichat(hybbx_service_t *service,
hybbx_session_t *session,
const hybbx_parsed_command_t *cmd);
#ifdef __cplusplus
}
#endif
#endif /* HYBBX_AICHAT_H */
|