-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_types.go
More file actions
51 lines (44 loc) · 1.58 KB
/
Copy pathapi_types.go
File metadata and controls
51 lines (44 loc) · 1.58 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
package main
import (
"time"
)
// OpenAIChatMessage represents a single message in an OpenAI chat completion request
type OpenAIChatMessage struct {
Role string `json:"role"`
Content string `json:"content"`
}
// OpenAIChatRequest represents a request to the OpenAI chat completions API
type OpenAIChatRequest struct {
Model string `json:"model"`
Messages []OpenAIChatMessage `json:"messages"`
}
// OpenAIChatChoice represents a single choice in the OpenAI chat completion response
type OpenAIChatChoice struct {
Index int `json:"index"`
Message OpenAIChatMessage `json:"message"`
}
// OpenAIChatResponse represents a response from the OpenAI chat completions API
type OpenAIChatResponse struct {
ID string `json:"id"`
Choices []OpenAIChatChoice `json:"choices"`
}
// AIRecommendationResponse represents the structured response from the AI for climate recommendations
type AIRecommendationResponse struct {
ShouldOperateAirConditioner bool `json:"shouldOperateAirConditioner"`
TemperatureToSetAirConditionerInF int `json:"temperatureToSetAirConditionerInF"`
ShouldWindowBeOpen bool `json:"shouldWindowBeOpen"`
WeatherDescription string `json:"weatherDescription"`
}
// Rtl433WeatherReport represents the raw weather data from rtl_433 software
type Rtl433WeatherReport struct {
Time time.Time
Model string
Id uint32
Channel uint8
Battery_ok uint8
Temperature_F *float32
Temperature_C *float32
Humidity float32
Button *uint8
Mic string
}