ciyidogan commited on
Commit
1800f76
·
verified ·
1 Parent(s): ce02052

Upload service_config.jsonc

Browse files
Files changed (1) hide show
  1. service_config.jsonc +153 -150
service_config.jsonc CHANGED
@@ -1,150 +1,153 @@
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
- }
 
 
 
 
1
+ {
2
+ // =====================================================
3
+ // FLARE GLOBAL CONFIGURATION
4
+ // =====================================================
5
+ "config": {
6
+ "work_mode": "hfcloud", // "hfcloud" | "cloud" | "on-premise"
7
+ "cloud_token": "<your cloud token>", // eğer workmode hfcloud ya da cloud ise zorunlu, on-premise'de kullanılmayacak.
8
+ "spark_endpoint": "https://ucsturkey-spark.hf.space", // Spark servisine erişim için kullanılacak url
9
+
10
+ // === Login Users (bcrypt hash + salt): Flare UI kullanılabilecek user'lar ==============
11
+ "users": [
12
+ {
13
+ "username": "admin",
14
+ "password_hash": "8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918",
15
+ "salt": "random_salt_string"
16
+ }
17
+ ]
18
+ },
19
+
20
+ // =====================================================
21
+ // PROJECTS: Her bir proje bir virtual agent'ı tanımlar
22
+ // =====================================================
23
+ "projects": [
24
+ {
25
+ "name": "coronos_assistant", // Virtual agent adı
26
+ "enabled": true, // Kullanımda olma durumu
27
+ "last_version_number": 1, // Projelerin version_number için versiyon counter. Artarak ilerler.
28
+
29
+ // -------------------------------------------------
30
+ // VERSIONS: Proje revizyonları ayrı bir version_number ile takip edilir.
31
+ // Yayınlanmış versiyonlar üzerinde düzenleme yapılamaz.
32
+ // Yeni versiyon oluşturumak için published versiyonlardan biri seçilir ve kopyası oluştulur, bu kopya üzerinde düzenleme yapılabilir.
33
+ // -------------------------------------------------
34
+ "versions": [
35
+ {
36
+ "version_number": 1, // Proje versiyonu
37
+ "published": true, // Versiyonun yayınlanma durumu.
38
+
39
+ // === Virtual agent'ın yapabileceği işleri tarifler =========
40
+ "general_prompt": "You are an airline assistant. You can book tickets, give information about booked tickets ...",
41
+
42
+ // === LLM configuration =======================
43
+ "llm": {
44
+ "repo_id": "ytu-ce-cosmos/Turkish-Llama-8b-DPO-v0.1", // eğer workmode hfcloud ve cloud ise, kullanılacak llm'in repo id'si. Eğer on-premise ise, llm'in indirileceği url ya da llm'in indirilmeden kullanılacağı network folder path
45
+ "generation_config": { // Llm'in kullanımı için gerekli konfigürasyon parametreleri
46
+ "max_new_tokens": 128,
47
+ "temperature": 0.3,
48
+ "top_p": 0.7,
49
+ "repetition_penalty": 1.1
50
+ },
51
+ "use_fine_tune": false, // LoRA fine-tune model kullanılma durumu
52
+ "fine_tune_zip": "" // use_fine_tune: true ise, kullanılacak LoRA adapter zip'in indirleceği url, ya da network file path.
53
+ },
54
+
55
+ // === INTENTS =================================
56
+ "intents": [
57
+ {
58
+ "name": "currency_rate_intent", // alt çizgi, tire yok
59
+ "caption": "Kur sorgulama",
60
+ "locale": "tr-TR",
61
+ "dependencies": [], // intent bağımlılıkları.
62
+
63
+ // Intent detection
64
+ "examples": [
65
+ "What is the dollar rate?",
66
+ "How much is the euro?"
67
+ ],
68
+ "detection_prompt": "Identify if user is asking for currency rate information.", // Intent detection için kullanılacak system prompt.
69
+
70
+ // Parameters: Intent tespit edildiğinde, kullanıcının ifadesinden extract edilecek parametreler
71
+ "parameters": [
72
+ {
73
+ "name": "currency",
74
+ "caption": "Döviz cinsi", // Eksik parametreyi tamamlarken kullanıcıya söylenebilecek parametre adı
75
+ "type": "string",
76
+ "required": true,
77
+ "extraction_prompt": "Extract the currency code (USD, EUR, TRY) from the user message.", // Parametre extraction için kullanılacak system prompt
78
+ "validation_regex": "^(USD|EUR|TRY)$", // kullanıcıdan alınan parametre değerini validate etmek için kullanılacak regex. Opsiyonel.
79
+ "invalid_prompt": "Geçersiz para birimi girdiniz. USD, EUR veya TRY şeklinde giriniz.", // Parametre değeri invalid ise kullanıcıya söylenecek mesajı oluşturacak system prompt
80
+ "type_error_prompt": "Para birimi metin olmalıdır (ör: USD)." // Eğer parametre tipi hatalıysa kullanıcıya söylenecek mesajı oluşturacak system prompt
81
+ }
82
+ ],
83
+
84
+ // API to call
85
+ "action": "currency_api", // Bu intent tespit edilip, parametreleri tamamlandığında çağırılacak api'nin adı.
86
+
87
+ // Fallbacks
88
+ "fallback_timeout_prompt": "Kur servisinde gecikme yaşanıyor. Lütfen biraz sonra tekrar deneyin.", // Api timeout durumunda kullanıcıya söylenecek mesajı oluşturacak system prompt
89
+ "fallback_error_prompt": "Kur bilgileri alınırken bir hata oluştu, daha sonra tekrar deneyebilir misiniz?" // Api hatası durumunda kullanıcıya söylenecek mesajı oluşturacak system prompt
90
+ }
91
+
92
+ // ... başka intent'ler
93
+ ]
94
+ }
95
+
96
+ // ... yeni versiyonlar
97
+ ]
98
+ }
99
+
100
+ // ... başka projeler
101
+ ],
102
+
103
+ // =====================================================
104
+ // API DEFINITIONS (dict by name)
105
+ // =====================================================
106
+ "apis": {
107
+ "currency_api": {
108
+ "url": "https://mock.api/currency",
109
+ "method": "POST",
110
+
111
+ // Headers as dict; placeholders destekler
112
+ "headers": {
113
+ "Content-Type": "application/json",
114
+ "Authorization": "Bearer {{auth_tokens.currency_api.token}}"
115
+ },
116
+
117
+ // Body template
118
+ "body_template": {
119
+ "currency": "{{variables.currency}}"
120
+ },
121
+
122
+ // Timeout & retry
123
+ "timeout_seconds": 5,
124
+ "retry": {
125
+ "max_attempts": 3,
126
+ "backoff_seconds": 2,
127
+ "strategy": "static" // "static" | "exponential"
128
+ },
129
+
130
+ // Auth (optional)
131
+ "auth": {
132
+ "enabled": true,
133
+ "token_endpoint": "https://mock.api/auth",
134
+ "body_template": {
135
+ "client_id": "...",
136
+ "client_secret": "..."
137
+ },
138
+ "response_token_path": "token", // json-path style. Ex: xx.yy.z
139
+ "token_refresh_endpoint": "", // opsiyonel
140
+ "token_refresh_body": {} // token_refresh_endpoint varsa zorunlu, yoksa opsiyonel.
141
+ },
142
+
143
+ // Proxy (optional)
144
+ "proxy": {
145
+ "enabled": false,
146
+ "url": "http://proxy.local:8080" // enabled: true ise zorunlu, değilse opsiyonel
147
+ },
148
+
149
+ // API response → human-friendly answer
150
+ "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}}"
151
+ }
152
+ }
153
+ }