snow cortex summarize

주어진 영어 입력 텍스트를 요약합니다.

구문

snow cortex summarize
  <text>
  --file <file>
  --connection <connection>
  --host <host>
  --port <port>
  --account <account>
  --user <user>
  --password <password>
  --authenticator <authenticator>
  --private-key-file <private_key_file>
  --token-file-path <token_file_path>
  --database <database>
  --schema <schema>
  --role <role>
  --warehouse <warehouse>
  --temporary-connection
  --mfa-passcode <mfa_passcode>
  --enable-diag
  --diag-log-path <diag_log_path>
  --diag-allowlist-path <diag_allowlist_path>
  --format <format>
  --verbose
  --debug
  --silent
Copy

인자

text

요약을 생성해야 하는 원본 영어 텍스트가 포함된 문자열입니다. –file 옵션과 함께 사용할 수 없습니다.

선택 사항

--file FILE

요약을 생성할 영어 텍스트가 포함된 파일입니다. TEXT 인자와 결합할 수 없습니다.

--connection, -c, --environment TEXT

config.toml 파일에 정의된 연결의 이름입니다. 기본값: default.

--host TEXT

연결을 위한 호스트 주소입니다. 연결에 지정된 값을 재정의합니다.

--port INTEGER

연결의 포트입니다. 연결에 지정된 값을 재정의합니다.

--account, --accountname TEXT

Snowflake 계정에 할당된 이름입니다. 연결에 지정된 값을 재정의합니다.

--user, --username TEXT

Snowflake에 연결할 사용자 이름입니다. 연결에 지정된 값을 재정의합니다.

--password TEXT

Snowflake 비밀번호입니다. 연결에 지정된 값을 재정의합니다.

--authenticator TEXT

Snowflake 인증자입니다. 연결에 지정된 값을 재정의합니다.

--private-key-file, --private-key-path TEXT

Snowflake 개인 키 파일 경로입니다. 연결에 지정된 값을 재정의합니다.

--token-file-path TEXT

Snowflake에 연결할 때 사용해야 하는 OAuth 토큰이 포함된 파일 경로입니다.

--database, --dbname TEXT

사용할 데이터베이스입니다. 연결에 지정된 값을 재정의합니다.

--schema, --schemaname TEXT

사용할 데이터베이스 스키마입니다. 연결에 지정된 값을 재정의합니다.

--role, --rolename TEXT

사용할 역할입니다. 연결에 지정된 값을 재정의합니다.

--warehouse TEXT

사용할 웨어하우스입니다. 연결에 지정된 값을 재정의합니다.

--temporary-connection, -x

config에서 정의된 연결 대신, 명령줄 매개 변수로 정의된 연결을 사용합니다. 기본값: False.

--mfa-passcode TEXT

다단계 인증(MFA)에 사용할 토큰입니다.

--enable-diag

Python 커넥터 진단 테스트를 실행합니다. 기본값: False.

--diag-log-path TEXT

진단 보고서 경로입니다. 기본값: <temporary_directory>.

--diag-allowlist-path TEXT

선택적 허용 목록에 대한 진단 보고서 경로입니다.

--format [TABLE|JSON]

출력 형식을 지정합니다. 기본값: TABLE.

--verbose, -v

로그 수준 info 이상의 로그 항목을 표시합니다. 기본값: False.

--debug

로그 수준 디버그 이상에 대한 로그 항목을 표시하며, 디버그 로그에는 추가 정보가 포함됩니다. 기본값: False.

--silent

콘솔로의 중간 출력을 끕니다. 기본값: False.

--help

이 명령에 대한 도움말 텍스트를 표시합니다.

사용법 노트

없습니다.

  • 명령줄에 제공된 텍스트를 요약합니다.

    snow cortex summarize "John has a car. John's car is blue. John's car is old and John is thinking about buying a new car. There are a lot of cars to choose from and John cannot sleep because it's an important decision for John."
    
    Copy
    John has an old blue car and is considering buying a new one due to the many options available, causing him sleepless nights.
    
  • 파일에 저장된 텍스트를 요약합니다.

    이 예제에서는 about_cortex.txt 파일에 다음과 같은 내용이 포함되어 있다고 가정합니다.

    Snowflake Cortex gives you instant access to industry-leading large language models (LLMs) trained by researchers at companies like Mistral, Reka, Meta, and Google, including Snowflake Arctic, an open enterprise-grade model developed by Snowflake.
    
    Since these LLMs are fully hosted and managed by Snowflake, using them requires no setup. Your data stays within Snowflake, giving you the performance, scalability, and governance you expect.
    
    Snowflake Cortex features are provided as SQL functions and are also available in Python. The available functions are summarized below.
    
    COMPLETE: Given a prompt, returns a response that completes the prompt. This function accepts either a single prompt or a conversation with multiple prompts and responses.
    EMBED_TEXT_768: Given a piece of text, returns a vector embedding that represents that text.
    EXTRACT_ANSWER: Given a question and unstructured data, returns the answer to the question if it can be found in the data.
    SENTIMENT: Returns a sentiment score, from -1 to 1, representing the detected positive or negative sentiment of the given text.
    SUMMARIZE: Returns a summary of the given text.
    TRANSLATE: Translates given text from any supported language to any other.
    

    다음과 같이 파일 이름을 전달하여 snow cortex 명령을 실행합니다.

    snow cortex summarize --file about_cortex.txt
    
    Copy
    Snowflake Cortex offers instant access to industry-leading language models, including Snowflake Arctic, with SQL functions for completing prompts (COMPLETE), text embedding (EMBED\_TEXT\_768), extracting answers (EXTRACT\_ANSWER), sentiment analysis (SENTIMENT), summarizing text (SUMMARIZE), and translating text (TRANSLATE).