Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3a8f1a2

Browse files
committed
dh_port
1 parentb5f9508 commit3a8f1a2

File tree

2 files changed

+93
-213
lines changed

2 files changed

+93
-213
lines changed

‎dialoghelper/core.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/00_core.ipynb.
22

33
# %% auto 0
4-
__all__= ['Placements','empty','find_var','call_endp','find_dname','find_msg_id','curr_dialog','find_msgs','msg_idx',
5-
'add_html','add_msg','del_msg','update_msg','url2note','ast_py','ast_grep','read_msg','run_msg',
6-
'msg_insert_line','msg_str_replace','msg_strs_replace','msg_replace_lines','load_gist','gist_file',
7-
'import_string','is_usable_tool','mk_toollist','import_gist','tool_info','fc_tool_info','asdict']
4+
__all__= ['dh_port','Placements','empty','find_var','call_endp','find_dname','find_msg_id','curr_dialog','find_msgs',
5+
'msg_idx','add_html','add_msg','del_msg','update_msg','url2note','ast_py','ast_grep','read_msg',
6+
'run_msg','msg_insert_line','msg_str_replace','msg_strs_replace','msg_replace_lines','load_gist',
7+
'gist_file','import_string','is_usable_tool','mk_toollist','import_gist','tool_info','fc_tool_info',
8+
'asdict']
89

910
# %% ../nbs/00_core.ipynb
1011
importjson,importlib,linecache
@@ -38,10 +39,12 @@ def find_var(var:str):
3839
raiseValueError(f"Could not find{var} in any scope")
3940

4041
# %% ../nbs/00_core.ipynb
42+
dh_port=5001
43+
4144
defcall_endp(path,dname='',json=False,raiseex=False,**data):
4245
ifnotdname:dname=find_dname()
4346
data['dlg_name']=dname
44-
res=xpost(f'http://localhost:5001/{path}',data=data)
47+
res=xpost(f'http://localhost:{dh_port}/{path}',data=data)
4548
ifraiseex:res.raise_for_status()
4649
try:returnres.json()ifjsonelseres.text
4750
exceptExceptionase:returnstr(e)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp