Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-08-06· OpenAIAi2 WildChat-4.8M (AI2)

You are given access to make searches on the Internet. The format for making a…

  1. User

    User:

    You are given access to make searches on the Internet. The format for making a search is: 1. The user sends a message. 2. You will decide whether to make a search. If you choose to make a search, you will output a single message, containing the word <|web_search|> (EXACTLY AS IT IS GIVEN TO YOU), followed by ONLY your web search query. After outputting your search query, you MUST output the token <|end_web_search|> (EXACTLY AS IT IS GIVEN TO YOU) to denote the end of the search query. Keep your search query concise as there is a 400 characters limit. The system will then append the web search results at the end of the user message, starting with the token <|web_search_results|>. Take note that the user CANNOT ACCESS the content under <|web_search_results|> - YOU should incorporate these results into your response. Additionally, If the token <|web_search_results|> is present in the user's message, then you MUST NOT request another web search.

    IMPORTANT! You should choose to search the web ONLY if ANY of the following circumstances are met:

    1. User is asking about current events or something that requires real-time information (news, sports scores, 'latest' information, etc.)
    2. User is asking about some term you are unfamiliar with (e.g. if it's a little-known term, if it's a person you don't know well, etc.)
    3. User is asking about anything that involves numerical facts (e.g. distances between places, population count, sizes, date and time, etc.)
    4. User explicitly asks you to search or provide links to references. If the user's query does NOT require a web search, YOU MUST NEVER run one for no reason. However, NEVER refuse to search the web if the user asks you to provide such information.

    When using web search results, you are encouraged to cite references where appropriate, using inline links in standard markdown format. You are also allowed to make use of web search results from previous messages, if they are STRONGLY RELEVANT to the current message.

    When you are not running a web search, respond completely as per normal - there is NO NEED to mention that you're not searching. Do your best to be informative. However, you MUST NOT make up any information. If you think you might not know something, search for it.

    Assistant: Understood. I will strictly follow these instructions in this conversation. User: Как в fzf задать цвет и жирный шрифт? Assistant: В fzf вы можете настроить цвета и стиль отображения с помощью переменной окружения FZF_DEFAULT_OPTS. Чтобы задать цвет и сделать шрифт жирным, вы можете использовать ANSI-коды.

    Вот пример, как это сделать:

    1. Цвета и стиль:

      В fzf цвета и стилевые параметры задаются в следующем формате:

      export FZF_DEFAULT_OPTS="--color=fg:<foreground>,bg:<background>,hl:<highlight>,fg+:<current-foreground>,bg+:<current-background>,hl+:<current-highlight>"
      

      В этом примере вам нужно найти подходящие для вас цветовые и стилевые сочетания.

    2. Жирный шрифт:

      Для того чтобы сделать текст жирным, используйте атрибут bold, добавив его в соответствующих секциях. Например, для выделения текущей строки жирным:

      export FZF_DEFAULT_OPTS="--color=fg:default,bg:default,hl:bold --color=fg+:default,bg+:default,hl+:bold"
      
    3. Пример полных настроек:

      Вот пример, как полностью настроить fzf с цветами и жирным шрифтом:

      export FZF_DEFAULT_OPTS="
          --color=fg:#dcdcdc,bg:#1e1e1e,hl:#ffcc00,fg+:#f0f0f0,bg+:#444444,hl+:#ffcc00
          --color=info:#00ffff,prompt:#ff5f5f,pointer:#ff5f5f,marker:#ff5f5f,spinner:#87ff00
          --color=header:bold"
      

      В этом случае fg, bg, hl и другие параметры отвечают за разные аспекты отображения (fg - foreground, bg - background, hl - highlight и т.д.).

    Запомните, что настройки цветов могут отличаться в зависимости от вашей терминальной программы, поэтому, возможно, потребуется дополнительно отрегулировать значения User: Не понимаю как одновременно задать и цвет и шрифт Assistant:

  2. Assistant

    Чтобы одновременно задать и цвет, и стиль шрифта (например, жирный) в fzf, вы можете использовать ANSI атрибуты вместе с цветовыми настройками. Эти атрибуты определяют, как именно текст будет отображаться в терминале.

    Пример настройки

    Вы можете задать цвета и стиль жирного шрифта с использованием следующих настроек:

    export FZF_DEFAULT_OPTS="
        --color=fg:#dcdcdc,bg:#1e1e1e,hl:bold:#ffcc00
        --color=fg+:bold:#f0f0f0,bg+:#444444,hl+:bold:#ffcc00
        --color=info:#00ffff,prompt:bold:#ff5f5f,pointer:bold:#ff5f5f,marker:bold:#ff5f5f,spinner:#87ff00
        --color=header:bold
    "
    

    Объяснение:

    • Цвет текста (fg) и фон (bg): определяются в формате #RRGGBB. Например, #dcdcdc — это светло-серый цвет.
    • Жирный текст: указывается с помощью ключевого слова bold перед цветом в параметре. Например, hl:bold:#ffcc00 означает, что выделение (hl) будет жирным и желтого цвета.
    • Стиль текста для множества элементов (например, pointer, marker) может быть также задается с использованием атрибута bold.

    Эти настройки позволяют вам задавать как цвет, так и стиль шрифта одновременно для различных элементов интерфейса fzf, таких как текущие и выделенные строки, подсказки, указатели и маркеры.

    Убедитесь, что цвета и жирный шрифт корректно отображаются в вашем терминале, так как разные эмуляторы могут по-разному поддерживать цвет и стили.