MetaGPT

Форк
0
/
constant.py 
31 строка · 1.2 Кб
1
# function in tools, https://platform.openai.com/docs/api-reference/chat/create#chat-create-tools
2
# Reference: https://github.com/KillianLucas/open-interpreter/blob/v0.1.14/interpreter/llm/setup_openai_coding_llm.py
3
GENERAL_FUNCTION_SCHEMA = {
4
    "name": "execute",
5
    "description": "Executes code on the user's machine, **in the users local environment**, and returns the output",
6
    "parameters": {
7
        "type": "object",
8
        "properties": {
9
            "language": {
10
                "type": "string",
11
                "description": "The programming language (required parameter to the `execute` function)",
12
                "enum": [
13
                    "python",
14
                    "R",
15
                    "shell",
16
                    "applescript",
17
                    "javascript",
18
                    "html",
19
                    "powershell",
20
                ],
21
            },
22
            "code": {"type": "string", "description": "The code to execute (required)"},
23
        },
24
        "required": ["language", "code"],
25
    },
26
}
27

28

29
# tool_choice value for general_function_schema
30
# https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice
31
GENERAL_TOOL_CHOICE = {"type": "function", "function": {"name": "execute"}}
32

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.