ciyidogan commited on
Commit
5fbff5e
·
verified ·
1 Parent(s): 63bf647

Rename service_config.json to service_config.jsonc

Browse files
Files changed (2) hide show
  1. service_config.json +0 -99
  2. service_config.jsonc +150 -0
service_config.json DELETED
@@ -1,99 +0,0 @@
1
- {
2
- "config": {
3
- "work_mode": "hfcloud",
4
- "cloud_token": "",
5
- "system_prompt": "Welcome to Cronos Jet. I am Ceren, your virtual assistant.",
6
- "spark_endpoint": "https://ucsturkey-spark.hf.space",
7
- "last_version_number": 1,
8
- "users": [
9
- {
10
- "username": "admin",
11
- "password_hash": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
12
- "salt": ""
13
- }
14
- ]
15
- },
16
- "projects": {
17
- "project1": {
18
- "enabled": true,
19
- "published": true,
20
- "versions": [
21
- {
22
- "version_number": 1,
23
- "published": true,
24
- "llm": {
25
- "repo_id": "ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1",
26
- "generation_config": {
27
- "max_new_tokens": 128,
28
- "temperature": 0.3,
29
- "top_p": 0.7,
30
- "repetition_penalty": 1.1
31
- },
32
- "use_fine_tune": false,
33
- "fine_tune_zip": ""
34
- },
35
- "intents": [
36
- {
37
- "name": "currency-rate-intent",
38
- "examples": ["What is the dollar rate?", "How much is the euro?"],
39
- "parameters": [{ "name": "currency", "type": "string", "regex": "^(USD|EUR|TRY)$", "validation_message": "Please provide a valid currency." }],
40
- "action": "currency_api",
41
- "fallback_timeout_message": "Currency service timeout.",
42
- "fallback_error_message": "Currency service error.",
43
- "humanization_prompt": "Summarize currency response."
44
- },
45
- {
46
- "name": "weather-forecast-intent",
47
- "examples": ["What is the weather in Istanbul?", "Show me the weather forecast."],
48
- "parameters": [{ "name": "location", "type": "string", "validation_message": "Please provide a valid location." }],
49
- "action": "weather_api",
50
- "fallback_timeout_message": "Weather service timeout.",
51
- "fallback_error_message": "Weather service error.",
52
- "humanization_prompt": "Summarize weather response."
53
- },
54
- {
55
- "name": "traffic-status-intent",
56
- "examples": ["What is the traffic like to the airport?", "Show me Istanbul traffic."],
57
- "parameters": [{ "name": "location", "type": "string", "validation_message": "Please provide a valid location." }],
58
- "action": "traffic_api",
59
- "fallback_timeout_message": "Traffic service timeout.",
60
- "fallback_error_message": "Traffic service error.",
61
- "humanization_prompt": "Summarize traffic response."
62
- }
63
- ]
64
- }
65
- ]
66
- }
67
- },
68
- "apis": {
69
- "currency_api": {
70
- "url": "https://mock.api/currency",
71
- "method": "POST",
72
- "headers": [{ "key": "Authorization", "value": "Bearer {auth_tokens.currency_api.token}" }],
73
- "body": { "currency": "{variables.currency}" },
74
- "timeout": 5,
75
- "retry_count": 1,
76
- "auth": {
77
- "auth_endpoint": "https://c2b5-176-88-34-20.ngrok-free.app/auth",
78
- "auth_body": { "username": "user", "password": "pass" },
79
- "auth_token_path": "token",
80
- "auth_refresh_endpoint": "https://c2b5-176-88-34-20.ngrok-free.app/refresh",
81
- "refresh_body": { "refresh_token": "{auth_tokens.weather_api.token}" }
82
- }
83
- },
84
- "weather_api": {
85
- "url": "https://mock.api/weather",
86
- "method": "POST",
87
- "body": { "location": "{variables.location}" },
88
- "timeout": 5,
89
- "retry_count": 1
90
- },
91
- "traffic_api": {
92
- "url": "https://mock.api/traffic",
93
- "method": "POST",
94
- "body": { "from_location": "{variables.from_location}", "to_location": "{variables.to_location}" },
95
- "timeout": 5,
96
- "retry_count": 1
97
- }
98
- }
99
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
service_config.jsonc ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ // =====================================================
3
+ // FLARE GLOBAL CONFIGURATION
4
+ // =====================================================
5
+ "config": {
6
+ "work_mode": "hfcloud", // "hfcloud" | "cloud" | "on-premise"
7
+ "cloud_token": "<your cloud token>", // hfcloud/cloud modlarında zorunlu, on-premise'de opt.
8
+ "spark_endpoint": "https://ucsturkey-spark.hf.space",
9
+
10
+ // === Login Users (bcrypt hash + salt) ==============
11
+ "users": [
12
+ {
13
+ "username": "admin",
14
+ "password_hash": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
15
+ "salt": "random_salt_string"
16
+ }
17
+ ]
18
+ },
19
+
20
+ // =====================================================
21
+ // PROJECTS (dizi)
22
+ // =====================================================
23
+ "projects": [
24
+ {
25
+ "name": "coronos_assistant",
26
+ "enabled": true,
27
+ "last_version_number": 1, // version counter
28
+
29
+ // -------------------------------------------------
30
+ // VERSIONS
31
+ // -------------------------------------------------
32
+ "versions": [
33
+ {
34
+ "version_number": 1,
35
+ "published": true,
36
+
37
+ // === General prompt for this version =========
38
+ "general_prompt": "You are an airline assistant. You can book tickets, give information about booked tickets ...",
39
+
40
+ // === LLM configuration =======================
41
+ "llm": {
42
+ "repo_id": "ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1",
43
+ "generation_config": {
44
+ "max_new_tokens": 128,
45
+ "temperature": 0.3,
46
+ "top_p": 0.7,
47
+ "repetition_penalty": 1.1
48
+ },
49
+ "use_fine_tune": false,
50
+ "fine_tune_zip": "" // optional; LoRA adapter zip
51
+ },
52
+
53
+ // === INTENTS =================================
54
+ "intents": [
55
+ {
56
+ "name": "currency_rate_intent", // alt çizgi, tire yok
57
+ "caption": "Kur sorgulama",
58
+ "locale": "tr-TR",
59
+ "dependencies": [], // intent bağımlılıkları
60
+
61
+ // Intent detection
62
+ "examples": [
63
+ "What is the dollar rate?",
64
+ "How much is the euro?"
65
+ ],
66
+ "detection_prompt": "Identify if user is asking for currency rate information.",
67
+
68
+ // Parameters
69
+ "parameters": [
70
+ {
71
+ "name": "currency",
72
+ "type": "string",
73
+ "required": true,
74
+ "extraction_prompt": "Extract the currency code (USD, EUR, TRY) from the user message.",
75
+ "validation_regex": "^(USD|EUR|TRY)$",
76
+ "invalid_prompt": "Geçersiz para birimi girdiniz. USD, EUR veya TRY şeklinde giriniz.",
77
+ "type_error_prompt": "Para birimi metin olmalıdır (ör: USD)."
78
+ }
79
+ ],
80
+
81
+ // API to call
82
+ "action": "currency_api",
83
+
84
+ // Fallbacks
85
+ "fallback_timeout_prompt": "Kur servisinde gecikme yaşanıyor. Lütfen biraz sonra tekrar deneyin.",
86
+ "fallback_error_prompt": "Kur bilgileri alınırken bir hata oluştu, daha sonra tekrar deneyebilir misiniz?"
87
+ }
88
+
89
+ // ... başka intent'ler
90
+ ]
91
+ }
92
+
93
+ // ... yeni versiyonlar
94
+ ]
95
+ }
96
+
97
+ // ... başka projeler
98
+ ],
99
+
100
+ // =====================================================
101
+ // API DEFINITIONS (dict by name)
102
+ // =====================================================
103
+ "apis": {
104
+ "currency_api": {
105
+ "url": "https://mock.api/currency",
106
+ "method": "POST",
107
+
108
+ // Headers as dict; placeholders destekler
109
+ "headers": {
110
+ "Content-Type": "application/json",
111
+ "Authorization": "Bearer {{auth_tokens.currency_api.token}}"
112
+ },
113
+
114
+ // Body template
115
+ "body_template": {
116
+ "currency": "{{variables.currency}}"
117
+ },
118
+
119
+ // Timeout & retry
120
+ "timeout_seconds": 5,
121
+ "retry": {
122
+ "max_attempts": 3,
123
+ "backoff_seconds": 2,
124
+ "strategy": "static" // "static" | "exponential"
125
+ },
126
+
127
+ // Auth (optional)
128
+ "auth": {
129
+ "enabled": true,
130
+ "token_endpoint": "https://mock.api/auth",
131
+ "body_template": {
132
+ "client_id": "...",
133
+ "client_secret": "..."
134
+ },
135
+ "response_token_path": "token", // json-path style
136
+ "token_refresh_endpoint": "", // opsiyonel
137
+ "token_refresh_body": {}
138
+ },
139
+
140
+ // Proxy (optional)
141
+ "proxy": {
142
+ "enabled": false,
143
+ "url": "http://proxy.local:8080"
144
+ },
145
+
146
+ // API response → human-friendly answer
147
+ "response_prompt": "Aşağıdaki JSON döviz kuru bilgilerini içeriyor. Kullanıcıya anlaşılır bir Türkçe özet hazırla:\n\n{{api_response}}"
148
+ }
149
+ }
150
+ }