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

Commit2f4a654

Browse files
committed
fix
1 parent3a8f1a2 commit2f4a654

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

‎dialoghelper/core.py‎

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

33
# %% auto 0
4-
__all__= ['dh_port','Placements','empty','find_var','call_endp','find_dname','find_msg_id','curr_dialog','find_msgs',
4+
__all__= ['dh_settings','Placements','empty','find_var','call_endp','find_dname','find_msg_id','curr_dialog','find_msgs',
55
'msg_idx','add_html','add_msg','del_msg','update_msg','url2note','ast_py','ast_grep','read_msg',
66
'run_msg','msg_insert_line','msg_str_replace','msg_strs_replace','msg_replace_lines','load_gist',
77
'gist_file','import_string','is_usable_tool','mk_toollist','import_gist','tool_info','fc_tool_info',
@@ -39,12 +39,12 @@ def find_var(var:str):
3939
raiseValueError(f"Could not find{var} in any scope")
4040

4141
# %% ../nbs/00_core.ipynb
42-
dh_port=5001
42+
dh_settings={'port':5001}
4343

4444
defcall_endp(path,dname='',json=False,raiseex=False,**data):
4545
ifnotdname:dname=find_dname()
4646
data['dlg_name']=dname
47-
res=xpost(f'http://localhost:{dh_port}/{path}',data=data)
47+
res=xpost(f'http://localhost:{dh_settings["port"]}/{path}',data=data)
4848
ifraiseex:res.raise_for_status()
4949
try:returnres.json()ifjsonelseres.text
5050
exceptExceptionase:returnstr(e)

‎nbs/00_core.ipynb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@
121121
"outputs": [],
122122
"source": [
123123
"#| export\n",
124-
"dh_port = 5001\n",
124+
"dh_settings ={'port':5001}\n",
125125
"\n",
126126
"def call_endp(path, dname='', json=False, raiseex=False, **data):\n",
127127
" if not dname: dname = find_dname()\n",
128128
" data['dlg_name'] = dname\n",
129-
" res = xpost(f'http://localhost:{dh_port}/{path}', data=data)\n",
129+
" res = xpost(f'http://localhost:{dh_settings[\"port\"]}/{path}', data=data)\n",
130130
" if raiseex: res.raise_for_status()\n",
131131
" try: return res.json() if json else res.text\n",
132132
" except Exception as e: return str(e)"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp