Gemini 2.0 Flash Thinking 모델은 모델이 응답의 일부로 거치는 '사고 과정'을 생성하도록 학습된 실험용 모델입니다. 따라서 Flash Thinking 모델은 Gemini 2.0 Flash Experimental 모델보다 더 강력한 추론 기능을 갖추고 있습니다.
사고 모델 사용
Flash Thinking 모델은 Google AI Studio 및 Gemini API를 통해 사용할 수 있습니다. Gemini API는 응답에 생각을 반환하지 않습니다.
기본 요청 보내기
이 예에서는 새 Google Genai SDK와 API의 v1alpha
버전을 사용합니다.
from google import genai
client = genai.Client(api_key='GEMINI_API_KEY', http_options={'api_version':'v1alpha'})
response = client.models.generate_content(
model='gemini-2.0-flash-thinking-exp',
contents='Explain how RLHF works in simple terms.',
)
print(response.text)
멀티턴 사고 대화
멀티턴 대화 중에 이전 턴의 생각은 모델의 입력에서 제거됩니다.
새로운 Google Genai SDK는 대화 상태를 관리하는 데 도움이 되는 다중 대화 채팅 세션을 만드는 기능을 제공합니다.
from google import genai
client = genai.Client(api_key='GEMINI_API_KEY', http_options={'api_version':'v1alpha'})
chat = client.aio.chats.create(
model='gemini-2.0-flash-thinking-exp',
)
response = await chat.send_message('What is your name?')
print(response.text)
response = await chat.send_message('What did you just say before this?')
print(response.text)
제한사항
Flash Thinking 모델은 실험용 모델이며 다음과 같은 제한사항이 있습니다.
- JSON 모드 또는 검색 기반 없음
- 생각은 Google AI 스튜디오에만 표시됩니다.
다음 단계
- Google AI Studio에서 Flash Thinking 모델을 사용해 보세요.
- Flash Thinking Colab을 사용해 보세요.