config_browserqwen.py 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import os
  2. from pathlib import Path
  3. """ ===== global setting ===== """
  4. # the path of browser infomation
  5. work_space_root = os.path.join(Path(__file__).parent.parent, 'workspace/')
  6. cache_root = os.path.join(work_space_root, 'browser_cache/')
  7. download_root = os.path.join(work_space_root, 'download/')
  8. browser_cache_file = 'browse.jsonl'
  9. url_file = 'popup_url.jsonl'
  10. # the path of workspace of code interpreter
  11. code_interpreter_ws = os.path.join(work_space_root, 'ci_workspace/')
  12. MAX_TOKEN = 4000 # the max token number of reference material
  13. llm = 'Qwen-7B-Chat' # ['Qwen-7B-Chat', 'gpt-4'] - the llm for using
  14. prompt_lan = 'EN' # ['CN', 'EN'] - the language of built-in prompt
  15. # using similarity search on reference material before answer
  16. similarity_search = True # [True, False]
  17. similarity_search_type = 'jaccard' # ['keyword', 'querymatch', 'llm', 'jaccard']
  18. """ ===== main.py setting ===== """
  19. # the port of main.py
  20. fast_api_port = 7866
  21. figure_host = '127.0.0.1'
  22. fast_api_figure_url = 'http://'+figure_host+':'+str(fast_api_port)+'/static'
  23. address_file = os.path.join(work_space_root, 'address_file.json')
  24. pre_gen_question = False # [True, False] - pre gen qustion for each block
  25. """ ===== app.py setting (editing workstation) ===== """
  26. max_days = 7 # the number of days for displaying
  27. auto_agent = False # [True, False] - automatic using plug-in after wrinting every section
  28. # special instructions in editing
  29. plugin_flag = '/plug' # using plug-in
  30. code_flag = '/code' # using code interpreter
  31. title_flag = '/title' # writing a full article with planning
  32. ifbunit_flag = '/ifbunit'
  33. """ ===== app_in_browser.py setting (browser interactive interfaces) ===== """
  34. app_in_browser_port = 7890