Unverified Commit dc83f6d8 authored by jinyuan sun's avatar jinyuan sun Committed by GitHub
Browse files

Merge branch 'main' into v2_release

parents 7d4c9c61 9268d232
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ See more details in [here](./copilot_public/README.md)

- The [ChatMol web-browser interface](http://xp.chatmol.org/chatmol.html) allows you to submit PyMOL requests and execute them in PyMOL via ChatMol. (Please note that this feature is browser setting-dependent)

## Acknowledgements

As an open source project, we thank the support from [ChemXAI](https://www.chemxai.com/), [WeComput](https://www.wecomput.com/) and [levinthal](https://www.levinthal.bio/).

## License
This project is released under the MIT License.

chatmol-streamlit/1pga.cif

deleted100644 → 0
+0 −1820

File deleted.

Preview size limit exceeded, changes collapsed.

+2 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ from pymol import cmd


class PyMOLCommandHandler(http.server.BaseHTTPRequestHandler):

    def __init__(self):

        from http import HTTPStatus
@@ -472,6 +473,7 @@ cmd.extend("chatlite", pymol_assistant.chatlite)
cmd.extend("update_model", pymol_assistant.update_model)
cmd.extend("init_server", init_server)


cmd.extend("save_conversation", pymol_assistant.save_conversation)
cmd.extend("load_conversation", pymol_assistant.load_conversation)
cmd.extend("execute_stashed_commands", pymol_assistant.execute_stashed_commands)
+3 −2
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ class ChatMol:
    def __init__(self,
                openai_api_key=None, 
                verbose=False,
                gpt_model="gpt-3.5-turbo-1106",
                gpt_model="gpt-4o",
                chatgpt_max_history=10,
                chatgpt_temp=0,
                chatgpt_max_tokens=2048,
@@ -29,6 +29,7 @@ class ChatMol:
        self.claude_conversation_messages = []
        self.chatmol_llm_conversation_history = []
        self.chatgpt_sys_prompt = "You are an expert familiar with PyMOL and specialized in providing PyMOL command line code solutions accuratly, and concisely. "
        self.chatgpt_sys_prompt += "You think step-by-step before you conclude correctly. "
        self.chatgpt_sys_prompt += "When providing demos or examples, try to use 'fetch' if object name is not provided. "
        self.chatgpt_sys_prompt += "Prefer academic style visulizations. Code within triple backticks, comment and code should not in the same line. "
        self.chatmol_llm_prompt_dict = {
+1 −1
Original line number Diff line number Diff line
@@ -231,7 +231,7 @@ def func_schema_gen(registry):
            if (p_desc.find('Optional') == -1 and p_desc.find('optional') == -1):
                required.append(param_name)
            props[param_name] = {'type':"string","description":param_desc[param_name]}
        params['reguired'] = required
        params['required'] = required
        func_schema['parameters'] = params
        func_sche_dict[r['service_name']] = func_schema
        pprint.pprint(func_schema)
Loading