Google Bard = Gemini - pro
google gemini ๋ผ์ธ์ (2023.12.6)์ด ๊ณต๊ฐ๋์ง ๋ฒ์จ 2๋ฌ์ด ๋์ด๊ฐ์ง๋ง API๋ฉฐ ์ฌ์ฉ์๋ฅผ ์ฐพ๊ธฐ ์ด๋ ต๋ค. ๊ทธ๋งํผ OpenAI, Open source LLM์ด ์ฌ๋๋ค์ ๊ด์ฌ์ด ์ ๋ ค ์๋๋ฐ Gemini-pro, ๊ทธ๊ฒ๋ GPT-3 ํน์ GPT-3.5์ ์คํ๋ ๋ชจ๋ธ์ด ๋ฌด๋ฃ API๋ก ์ฌ์ฉ์ด ๊ฐ๋ฅํ๋ฐ ์ ์ธ ์ด์ ๊ฐ ์๋ค. (๋จ, ๋ฐ์ดํฐ ํ์ต ์ฌ์ฌ์ฉ ํ์ฉ)
์ ๊ณต API Spec.
https://ai.google.dev/models/gemini?hl=ko
Gemini Pro | ๋ชจ๋ธ ์ต์ข ์ ๋ฐ์ดํธ | 2023๋ 12์ |
๋ชจ๋ธ ์ฝ๋ | models/gemini-pro | |
๋ชจ๋ธ ๊ธฐ๋ฅ |
|
|
์ง์๋๋ ์์ฑ ๋ฐฉ๋ฒ | generateContent | |
์ ๋ ฅ ํ ํฐ ํ๋ | 30720 | |
์ถ๋ ฅ ํ ํฐ ํ๋ | 2048 | |
๋ชจ๋ธ ์์ ์ฑ | ์์ ์ค์ ์ด ์๋์ผ๋ก ์ ์ฉ๋๋ฉฐ ๊ฐ๋ฐ์๊ฐ ์กฐ์ ํ ์ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ ์์ ์ค์ ์ฃผ์ ๋ฅผ ์ฐธ๊ณ ํ์ธ์. | |
๋น์จ ์ ํ | ์์ฒญ 60๊ฐ/๋ถ | |
Gemini Pro ๋น์ | ๋ชจ๋ธ ์ต์ข ์ ๋ฐ์ดํธ | 2023๋ 12์ |
๋ชจ๋ธ ์ฝ๋ | models/gemini-pro-vision | |
๋ชจ๋ธ ๊ธฐ๋ฅ |
|
|
์ง์๋๋ ์์ฑ ๋ฐฉ๋ฒ | generateContent | |
์ ๋ ฅ ํ ํฐ ํ๋ | 12288 | |
์ถ๋ ฅ ํ ํฐ ํ๋ | 4096 | |
๋ชจ๋ธ ์์ ์ฑ | ์์ ์ค์ ์ด ์๋์ผ๋ก ์ ์ฉ๋๋ฉฐ ๊ฐ๋ฐ์๊ฐ ์กฐ์ ํ ์ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ ์์ ์ค์ ์ฃผ์ ๋ฅผ ์ฐธ๊ณ ํ์ธ์. | |
๋น์จ ์ ํ | ์์ฒญ 60๊ฐ/๋ถ | |
Embedding | ๋ชจ๋ธ ์ต์ข ์ ๋ฐ์ดํธ | 2023๋ 12์ |
๋ชจ๋ธ ์ฝ๋ | models/embedding-001 | |
๋ชจ๋ธ ๊ธฐ๋ฅ |
|
|
์ง์๋๋ ์์ฑ ๋ฐฉ๋ฒ | embedContent | |
๋ชจ๋ธ ์์ ์ฑ | ์กฐ์ ํ ์ ์๋ ์์ ์ค์ ์ด ์์ต๋๋ค. | |
๋น์จ ์ ํ | ์์ฒญ 1,500๊ฐ/๋ถ |
LLM์ ๊ธฐ๋ณธ API๋ฅผ ๋ชจ๋ ์ง์ํ๋ ๋ฌด๋ฃ๋ก RAG ๊ตฌํ์ด ๊ฐ๋ฅํ๋ค.
Python Gemini-Pro API
1) API Key ์์ฑ [Create API Key].
https://makersuite.google.com/app/apikey
2) ๋ชจ๋ ์ค์น (python version >= 3.9)
pip install google-generativeai
import google.generativeai as genai
GOOGLE_API_KEY = '...' # input your API_KEY
genai.configure(api_key=GOOGLE_API_KEY)
for m in genai.list_models():
if 'generateContent' in m.supported_generation_methods:
print(m.name)
# supported_generation_methods
# models/gemini-pro
# models/gemini-pro-vision
model = genai.GenerativeModel('gemini-pro') # gemini-pro
4) content generative
response = model.generate_content("Bard๋ Gemini๋ ๋ค๋ฅธ๊ฒ ๋ญ์ผ?")
print(response.text) # cold.
* **๋ชฉ์ :** Bard๋ ๋ํ๋ฅผ ์ฃผ๋ํ๊ณ ์ ๋ณด๋ฅผ ์ ๊ณตํ๋๋ก ์ค๊ณ๋ ๋ฐ๋ฉด Gemini๋ ์ธ๊ฐ์ ์ง๋ฌธ์ ๋ตํ๋๋ก ์ค๊ณ๋์์ต๋๋ค.
* **์ง์ ๊ธฐ๋ฐ:** Bard๋ Google์ ๊ด๋ฒ์ํ ์ง์ ๊ธฐ๋ฐ์ ์ฌ์ฉํ์ง๋ง Gemini๋ ์ฌ์ ์ ์๋ ์ ๋ณด๋ง ์ฌ์ฉํฉ๋๋ค.
* **๊ตฌ์ฑ:** Bard๋ ๋๊ท๋ชจ ์ธ์ด ๋ชจ๋ธ(LLM)์ด๋ฉฐ Gemini๋ ๊ท์น ๊ธฐ๋ฐ ์์คํ
์
๋๋ค.
* **์ ์ฐ์ฑ:** Bard๋ ์๋ก์ด ์ ๋ณด๋ฅผ ํ์ตํ๊ณ ์๋ก์ด ์์
์ ์ ์ํ ์ ์์ง๋ง Gemini๋ ๊ทธ๋ ์ง ์์ต๋๋ค.
* **์ฐฝ์์ฑ:** Bard๋ ์ฐฝ์์ ์ธ ์๋ต์ ์์ฑํ ์ ์์ง๋ง Gemini๋ ๊ทธ๋ ์ง ์์ต๋๋ค.
* **์ธ๊ฐ๊ณผ์ ์ํธ ์์ฉ:** Bard๋ ์ธ๊ฐ๊ณผ ์์ฐ์ค๋ฝ๊ณ ๋ํ์ ๋ฐฉ์์ผ๋ก ์ํธ ์์ฉํ ์ ์์ง๋ง Gemini๋ ๊ทธ๋ ์ง ์์ต๋๋ค.
์ ๋ฆฌ
gemini์ ์ฅ์ ์ ๊ผฝ์๋ฉด google์ ์ฅ์ ์ธ ๊ฒ์๊ธฐ๋ฅ ์ฆ ์ต์ ์ ๋ณด์ ๋ํ ๋ต๋ณ์ด ๋๋ผ์ธ ์ ๋๋ก ์ ๋ฐ์๋์ด ์๋ค. openai์ 3๊ฐ์ ์ฃผ๊ธฐ ํ์ต ๋ณด๋ค ๋ ๋์ ๊ฒฐ๊ณผ๋ฅผ ์ ๊ณตํ๋ค. ํ์ง๋ง ์น๋ช ์ ์ธ ๋จ์ ์ผ๋ก๋ ์ถ๋ ฅ ํ ํฐ ์ ํ๊ณผ ์ด์ฉ ์ ํ์ด ํ์ฌ๋ ๊ฑธ๋ ค์๋ค. ๋ฌด๋ฃ ์ฌ์ฉ์ ๊ฒฝ์ฐ ์์ ์ prompt๋ฅผ ์ฌํ์ต ๋๋ ๊ฒ์ ๋์ํ๊ณ ์ฌ์ฉํ๊ธฐ ๋๋ฌธ์ ์ฃผ์ํด์ผํ๋ค. ์์ด์ ๊ฒฝ์ฐ prompt๋ฅผ ์ ์ดํดํ๊ณ instruction ๋ํ ์ ์ํํ๋ค. ๋ค๋ง ํ๊ตญ์ด์ ๊ฒฝ์ฐ ๊ธ์ ์ ์ ํ์ด๋ ํน์ ๋๋ฉ์ธ์ ๋ํ ๋ต๋ณ์ด ๋ถ์ ํํ๋ค.
Create a list of 8 questions for an interview with a science fiction author. | |
ChatGPT 3.5 | Gemini-pro |
1. Can you tell us a bit about your background and what inspired you to become a science fiction author? 2. How do you approach world-building in your science fiction novels? What elements do you prioritize when creating a believable and immersive fictional universe? 3. Science fiction often explores societal or technological advancements. What themes or ideas do you find most fascinating to explore in your writing? 4. How do you balance scientific accuracy with imaginative storytelling in your science fiction works? 5. Many science fiction authors use their stories as a platform to comment on contemporary issues. How do you incorporate social or political commentary into your writing, if at all? 6. Can you share any unique challenges or difficulties you've encountered while writing science fiction, and how you overcame them? 7. Science fiction often explores the potential impact of technology on society. In your opinion, what responsibilities do science fiction authors have in shaping public perception or understanding of emerging technologies? 8. Can you discuss any upcoming projects or ideas you're currently working on, and what readers can expect from your future science fiction novels? |
Certainly! Here's a list of 8 engaging questions to ask a science fiction author during an interview: 1. What do you consider to be some of the most groundbreaking and thought-provoking science fiction concepts that have been explored in literature or film? 2. How do you find inspiration for your futuristic worlds, characters, and stories? Do you draw upon current scientific advancements or look to historical and cultural influences? 3. How do you balance the exciting and imaginative aspects of science fiction with the need for realism and plausibility? 4. What are some of the ethical and philosophical questions that you intentionally incorporate into your works? Do you aim to provoke discussion and reflexión among your readers? 5. What role do scientific accuracy and technological feasibility play in your creative process? Do you consult with experts or conduct extensive research to ensure the authenticity of your science fiction scenarios? 6. How do you view the relationship between science fiction and society? Do you believe that your work as a science fiction author has the potential to influence or shape cultural perceptions of technology, space exploration, and the future? 7. Are there any particular science fiction tropes or subgenres that you find particularly appealing or challenging to write? 8. Could you share your thoughts on the current and future impact of artificial intelligence, space colonization, o |
'๐ ๏ธ Tools' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Gemini] github action์์ gemini api ์ฌ์ฉ์ _CLOUD_SDK_MISSING_CREDENTIALS Auth Error (0) | 2024.03.03 |
---|---|
[NotesOllama] Mac Default Memo Application + OpenLLM(Custom) (0) | 2024.02.25 |
[Candle] huggingface Candle (0) | 2024.01.24 |
[Github Copilot] Prompt crafting (0) | 2023.12.02 |
[Ubuntu] Vim plugin ์ค์น(๋ค์ฌ์ฐ๊ธฐ, ์๋๊ดํธ) (0) | 2020.05.31 |