File size: 2,085 Bytes
ae90eca
 
 
195cad5
 
ae90eca
d3da264
5e0943c
 
d3da264
5e0943c
 
 
d3da264
 
 
 
 
 
 
 
 
 
 
 
 
 
ae90eca
 
d5436e0
 
ae90eca
d5436e0
ae90eca
d5436e0
ae90eca
5e0943c
 
d5436e0
ae90eca
 
195cad5
 
ae90eca
 
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
import os
import logging

from typing import Optional

TEMPLATE = """
A complete list of commands that are designed to facilitate the use of the voice assistant Chelsea. 
The complete list consists of no more than 100 commands written in a txt file. 
The list of commands will be updated as the assistant is developed. 
The first version of the programme (Arctic Monkeys) contains a total of 6 commands. 

The list of commands and their use. 

documentation command: first used to inform you how you able to interact with assistant. To call this command just say Documentation in english or 
Документація in Ukrainian. Note you can use assistant without those commands, however for getting more advance expirience i strongly recommend use them.

bmac command: Support author on Buy Me a Coffee. To activate this command you can spell in english Buy Me A Coffee, BMAC, Coffee, Pay the ghost and 
in Ukrainian Кава, Заплати примарі.

translate command: Use for translating speech in language which you choice. Commands to use it in english is Translate and in Ukrainian is Переклад.

change model command: You able to choose model  using hugging face api (hf) or local model using Llama. List of models for hf are: Mistaril and Tinyllama and for lc: Phi 3 and TinyLlama either.
To call command use in english Change model and in Ukrainian Змінити модель.

yes command: Command to confirm your consent. To call command use in english Yes, Yeah, Yep and in Ukrainian Так, Ага.

no command: Command to confirm your disagreement. To call command use in english No, Nah and in Ukrainian Ні, Ніт, Ніц.
"""


def generate_doc(path: Optional[str] = None) -> Optional[str]:
    if path is not None:
        file = os.path.join(path, NAME)
    else:
        current_dir = os.path.dirname(os.path.realpath(__file__))
        file = os.path.join(current_dir, NAME)

    logging.info(file)

    try:
        with open(file, 'w') as f:
            f.write(TEMPLATE)
        return file
    except IOError as e:
        logging.error(e)