CoolFace
Apppublic

Zyan11/LocalAI-Amlan-Edition

sourceHugging Faceupdated 8mo agoView on Hugging Face
5likes
arch-function.yaml68 linesDownload Raw Back to gallery
1---2name: "chatml"3 4config_file: |5  backend: "llama-cpp"6  mmap: true7  function:8    disable_no_action: true9    grammar:10      mixed_mode: false11      disable: true12      parallel_calls: true13      expect_strings_after_json: true14    json_regex_match:15    - "(?s)<tool_call>(.*?)</tool_call>"16    - "(?s)<tool_call>(.*)"17    capture_llm_results:18      - (?s)<scratchpad>(.*?)</scratchpad>19    replace_llm_results:20      - key: (?s)<scratchpad>(.*?)</scratchpad>21        value: ""22  template:23    chat_message: |24      <|im_start|>{{ .RoleName }}25      {{ if .FunctionCall -}}26      Function call:27      {{ else if eq .RoleName "tool" -}}28      Function response:29      {{ end -}}30      {{ if .Content -}}31      {{.Content }}32      {{ end -}}33      {{ if .FunctionCall -}}34      {{toJson .FunctionCall}}35      {{ end -}}<|im_end|>36    function: |37      <|im_start|>system38      # Tools39 40      You may call one or more functions to assist with the user query.41 42      You are provided with function signatures within <tools></tools> XML tags:43      <tools>44      {{range .Functions}}45      {'type': 'function', 'function': {'name': '{{.Name}}', 'description': '{{.Description}}', 'parameters': {{toJson .Parameters}} }}46      {{end}}47      </tools>48      For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:49      <tool_call>50      {"name": <function-name>, "arguments": <args-json-object>}51      </tool_call>52      <|im_end|>53      {{.Input -}}54      <|im_start|>assistant55    chat: |56      {{.Input -}}57      <|im_start|>assistant58    completion: |59      {{.Input}}60  context_size: 409661  f16: true62  stopwords:63  - '<|im_end|>'64  - '<dummy32000>'65  - '</s>'66  - "<|eot_id|>"67  - "<|end_of_text|>"68