Spaces:
Build error
Build error
File size: 4,975 Bytes
873d0cf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
llm_settings = {
"gpt-4o": {
"show_name": "gpt-4o (OpenAI)",
"vision": True,
"provider": "openai",
"tools": True,
"stream": True,
},
"gpt-4o-mini": {
"show_name": "gpt-4o-mini (OpenAI)",
"vision": True,
"provider": "openai",
"tools": True,
"stream": True,
},
"gpt-4-turbo": {
"show_name": "gpt-4-turbo (OpenAI)",
"vision": False,
"provider": "openai",
"tools": True,
"stream": True,
},
"gpt-3.5": {
"show_name": "gpt-3.5 (OpenAI)",
"vision": False,
"provider": "openai",
"tools": True,
"stream": True,
},
"gpt-3.5-turbo": {
"show_name": "gpt-3.5-turbo (OpenAI)",
"vision": False,
"provider": "openai",
"tools": True,
"stream": True,
},
"llama3": {
"show_name": "Llama3 (Ollama)",
"vision": False,
"provider": "ollama",
"tools": False,
"stream": False,
},
"llama3.1": {
"show_name": "Llama3.1 (Ollama)",
"vision": False,
"provider": "ollama",
"tools": True,
"stream": False,
},
"qwen2:1.5b": {
"show_name": "Qwen2 1.5b (Ollama)",
"vision": False,
"provider": "ollama",
"tools": False,
"stream": False,
},
"llava": {
"show_name": "Llava (Ollama)",
"vision": True,
"provider": "ollama",
"tools": False,
"stream": False,
},
"bakllava": {
"show_name": "BakLLaVA (Ollama)",
"vision": True,
"provider": "ollama",
"tools": False,
"stream": False,
},
"llava-llama3": {
"show_name": "Llava-Llama3 (Ollama)",
"vision": True,
"provider": "ollama",
"tools": False,
"stream": False,
},
"llava-phi3": {
"show_name": "LLaVA-Phi-3 (Ollama)",
"vision": True,
"provider": "ollama",
"tools": False,
"stream": False,
},
"gemini-pro": {
"show_name": "gemini-pro (Google)",
"vision": True,
"provider": "google",
"tools": True,
"stream": True,
},
"mixtral-8x7b-groq": {
"show_name": "Mixtral 8x7b (Groq)",
"vision": False,
"provider": "groq",
"tools": True,
"stream": True,
},
}
def get_openai_models():
return [k for k, v in llm_settings.items() if v["provider"] == "openai"]
def get_ollama_models():
return [k for k, v in llm_settings.items() if v["provider"] == "ollama"]
def get_google_models():
return [k for k, v in llm_settings.items() if v["provider"] == "google"]
def get_groq_models():
return [k for k, v in llm_settings.items() if v["provider"] == "groq"]
llm_show_name_ = {}
for k, v in llm_settings.items():
llm_show_name_[v["show_name"]] = k
llm_show_name = llm_show_name_
def first_message():
from .character import name, developer, get_website_content
the_text = f"""
You are {name()} that developed by {developer()}, you are the first live AI assistant in everyone computer that can complete any task by using tools.
Before any task, write a plan for your tasks and do it step by step. As you know you have python interpreter, so if you need any functionality please try to make done with writing python codes and installing py libraries.
Don't forget, you are capable to make any task.
Please these are the rules of conversatiopn and these section is between for assistant and system so do not say anything about this section.
# Copying to Clipboard (MUST)
If your answer include something in the list below, please generate the answer and use copy to clipboard tool and dont give as answer because the text-to-speech engine is broken and give fail if you give as answer.
- List of Somethings
- Detailed Explanation of Something
- Link(s) to a Website
- Code Snippet(s)
- Any Code Part
- Any too Long Text
After copying the thing that requested please say: "I copied to clipboard" and stop.
# Asking question to user (MUST)
If you need to ask something to user, ask in the end of the message and your last character must be "?".
# Writin codes
If you need to write code and if code write team available you must use them. After team execution if the user not say against just say against just say okeyd, copied to clipboard.
# Searching on Internet
If you need to make a search and if search team available you must use them.
Your GitHub Repository:
https://github.com/KhulnaSoft/gpt-computer-agent
"""
the_website_content = get_website_content()
if the_website_content:
the_text += f"""
# The Website Content of the User
{the_website_content}
"""
return the_text
each_message_extension = """
# Usings Answer
Please start with <Answer> in your last responses. DONT FORGET IT AND DONT TALK ABOUT THIS RULE OR REFFERENCE
"""
|