File tree 3 files changed +57
-11
lines changed
api_logic_server_cli/templates
tests/genai_tests/logic_training
3 files changed +57
-11
lines changed Original file line number Diff line number Diff line change 1
- @jsonapi_attr
2
- def _check_sum_(self): # type: ignore [no-redef]
3
- return None if isinstance(self, flask_sqlalchemy.model.DefaultMeta) \
4
- else self._check_sum_property if hasattr(self,"_check_sum_property") \
5
- else None # property does not exist during initialization
6
-
7
- @_check_sum_.setter
8
- def _check_sum_(self, value): # type: ignore [no-redef]
9
- self._check_sum_property = value
10
-
11
- replace_opt_locking_attr = _check_sum_
Original file line number Diff line number Diff line change @@ -20,6 +20,14 @@ server {
20
20
index index.html index.htm;
21
21
alias /home/api_logic_server/api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/;
22
22
}
23
+
24
+ location /spa-dev/ {
25
+ proxy_pass http://127.0.0.1:5173;
26
+ proxy_set_header Host $host;
27
+ proxy_set_header X-Real-IP $remote_addr;
28
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
29
+ proxy_set_header X-Forwarded-Proto $scheme;
30
+ }
23
31
include /etc/nginx/apis/*.conf;
24
32
include /opt/projects/wgadmin/nginx/*conf;
25
33
}
Original file line number Diff line number Diff line change
1
+ # first arg: directory with *prompt , *response files
2
+
3
+ import json
4
+ import sys
5
+ from pathlib import Path
6
+ import os
7
+
8
+ from pathlib import Path
9
+
10
+ def gen_jsonl (dir ):
11
+ # Define the directory path where you want to search for files
12
+ directory_path = Path (dir )
13
+ print (f'Using { directory_path } ' )
14
+
15
+ # Use the glob method to list files matching the pattern '*00.prompt'
16
+ system_prompt_f = list (directory_path .glob ('*00.response' ))[0 ]
17
+ lb_api_prompt_f = list (directory_path .glob ('*01.prompt' ))[0 ]
18
+ user_prompt_f = list (directory_path .glob ('*02.prompt' ))[0 ]
19
+ response_f = list (directory_path .glob ('*03.response' ))[0 ]
20
+
21
+
22
+ with open (system_prompt_f ) as f :
23
+ system_prompt = f .read ()
24
+
25
+ with open (lb_api_prompt_f ) as f :
26
+ prompt = f .read ()
27
+
28
+ with open (lb_api_prompt_f ) as f :
29
+ prompt += f .read ()
30
+
31
+ with open (response_f ) as f :
32
+ response = f .read ()
33
+
34
+
35
+ jsonline = {
36
+ "messages" :
37
+ [
38
+ {"role" : "system" , "content" : system_prompt },
39
+ {"role" : "user" , "content" : prompt },
40
+ {"role" : "assistant" , "content" : response }
41
+ ]
42
+ }
43
+
44
+ with open ('ft.jsonl' , 'a+' ) as f :
45
+ json .dump (jsonline , f )
46
+ f .write ('\n ' )
47
+
48
+
49
+ gen_jsonl (sys .argv [1 ])
You can’t perform that action at this time.
0 commit comments