Files
letta-server/memgpt/local_llm/ollama/settings.py
Charles Packer 7f950b05e8 Patch local LLMs with context_window (#416)
* patch

* patch ollama

* patch lmstudio

* patch kobold
2023-11-10 12:06:41 -08:00

35 lines
894 B
Python

from ...constants import LLM_MAX_TOKENS
# see https://github.com/jmorganca/ollama/blob/main/docs/api.md
# and https://github.com/jmorganca/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values
SIMPLE = {
"options": {
"stop": [
"\nUSER:",
"\nASSISTANT:",
"\nFUNCTION RETURN:",
"\nUSER",
"\nASSISTANT",
"\nFUNCTION RETURN",
"\nFUNCTION",
"\nFUNC",
"<|im_start|>",
"<|im_end|>",
"<|im_sep|>",
# '\n' +
# '</s>',
# '<|',
# '\n#',
# '\n\n\n',
],
# "num_ctx": LLM_MAX_TOKENS,
},
"stream": False,
# turn off Ollama's own prompt formatting
"system": "",
"template": "{{ .Prompt }}",
# "system": None,
# "template": None,
"context": None,
}