[Jupyterhub] ๊ณ„์ • ์ƒ์„ฑ ์˜ค๋ฅ˜
ยท
๐Ÿ› ๏ธ Tools
http://127.0.0.1:53081/user/admin/api didn't respond in 30 seconds[E 2024-08-14 08:09:37.628 JupyterHub gen:629] Exception in Future .finish_user_spawn() done, defined at /usr/local/lib/python3.10/dist-packages/jupyterhub/handlers/base.py:1115> exception=TimeoutError("Server at http://127.0.0.1:53081/user/admin/api didn't respond in 30 seconds")> after timeout Traceback (most recent call last..
[Gemini] gemini calculate Tokenize in Locally
ยท
๐Ÿ› ๏ธ Tools
Google VertaxAI Python SDK  gemini tokenizer๋Š” ์›๋ž˜ ๊ณต๊ฐœ๋˜์ง€ ์•Š์•„ token์„ ๊ณ„์‚ฐํ•˜๋ ค๋ฉด API๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•˜๋Š” ๋ฒˆ๊ฑฐ๋กœ์›€์ด ์žˆ์—ˆ๋‹ค. ๊ทธ๋ž˜์„œ Google Cloud Community์— ์งˆ๋ฌธ์„ ๋“ฑ๋กํ–ˆ๋‹ค. ์š”๋Š” tiktoken๊ณผ ๊ฐ™์ด token ๊ณ„์‚ฐ์„ local๋กœ ํ•  ์ˆ˜์žˆ๊ฒŒ ๊ณต๊ฐœํ•ด ๋‹ฌ๋ผ๋Š” ๊ฒƒ์ด์—ˆ๋‹ค. token ์ˆ˜๋ฅผ ์•Œ ์ˆ˜ ์—†์œผ๋ฉด gemini-api๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ max_token์— ๋งž๊ฒŒ ๊ณ„์† ์กฐ์ •ํ•ด์•ผ ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์ˆ˜ ์ฐจ๋ก€ API๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•œ๋‹ค. ์ด๋Ÿฐ ๋ฌธ์ œ๋ฅผ ์˜์‹ํ–ˆ๋Š”์ง€ token ์ˆ˜๋ฅผ API๋กœ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ๊ฒŒ ๊ณต๊ฐœํ–ˆ์ง€๋งŒ ๋ฌธ์ œ๋Š” ๋‘ ๋ฒˆ์˜ API ์‚ฌ์šฉ๋„ ๋งˆ์Œ์— ๋“ค์ง€ ์•Š์•˜๋‹ค.   tiktoken์œผ๋กœ OpenAI์—์„œ๋Š” tokenizer์™€ vocab์„ ๊ณต๊ฐœํ•ด ํˆฌ๋ช…ํ•˜๊ฒŒ API ๋น„์šฉ์„ ์ฒญ..
[Ollama] Response Structure Answer
ยท
๐Ÿ› ๏ธ Tools
Ollama + Langchain Local llm์˜ ์„ฑ๋Šฅ์ด ๋‚˜๋‚ ์ด ์ข‹์•„์ง€๋ฉฐ ์ด์ œ๋Š” 8b์ด์ƒ์˜ ๋ชจ๋ธ ์ •๋„๋ฉด ํ•œ๊ตญ์–ด instruction์ด ์ž˜๋˜์–ด CoT๋ฅผ ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๋˜์—ˆ๋‹ค. ๊ฐ„๋‹จํ•œ ์˜ˆ์ œ๋ฅผ ํ†ตํ•ด ์ด๋ฆฌ๋กœ ์ €๋ฆฌ๋กœ ํŠ€๋˜ LLM์„ ์–ด๋–ป๊ฒŒ ์ œ์–ดํ•˜๋Š” ์ง€ ์•Œ์•„๋ณด์ž.    1.  Ollama cpp ๋ชจ๋ธ ์ค‘ ์ตœ๊ทผ์— ๊ณต๊ฐœ๋œ Gemma2 ์‚ฌ์šฉ gemma2 ๋ชจ๋ธ ์ค‘ ๊ธฐ๋ณธ ๋ชจ๋ธ์€ 9b ๋ชจ๋ธ๋กœ google์—์„œ ๋งŒ๋“  gemma์˜ ๋ฒ„์ „ 2์ธ open source llm์ด๋‹ค. ํ•œ๊ตญ์–ด๋„ ์ž˜ํ•ด์„œ ๋ช‡ ์•ˆ๋˜๋Š”  ํ•œ๊ตญ์–ด ์˜คํ”ˆ Foundation ๋ชจ๋ธ์ด๋‹ค. google ๋ชจ๋ธ์˜ ํŠน์ง•์ด Markdown์œผ๋กœ output์„ ๋ฐ›์•„ ์›ํ•˜๋Š” ํ˜•ํƒœ๋กœ ๋” ๋„“๊ฒŒ ๊ฐ€๊ณตํ•ด ๋ฐ›์„ ์ˆ˜์žˆ๋‹ค.   from langchain_community.llms import O..
[OpenAI] ๋ชจ๋ธ๋ณ„ ์ง€์› ์ค‘๋‹จ ์˜ˆ์ • ๋‚ ์งœ, Model deprecations
ยท
๐Ÿ› ๏ธ Tools
Model deprecations OpenAI์™€ ๊ฐ™์ด vectordb๋ฅผ ๊ตฌ์ถ•ํ•  ์ˆ˜ ์žˆ๊ฒŒ embedding API๋ฅผ ์ง€์›ํ•˜๋Š” ์„œ๋น„์Šค๊ฐ€ ๋งŽ์•„์กŒ๋‹ค. ์ด๋Ÿฌํ•œ platform์€ ์ผ๋ฐ˜์ธ๋“ค์ด ๋ณด์œ ํ•˜๊ธฐ ์–ด๋ ค์šด GPU ์ž์›์„ ํ•ด์†Œํ•ด ์ฃผ๋ฉด์„œ ์ €๋ ดํ•˜๊ฒŒ ์ด์šฉํ•  ์ˆ˜ ์žˆ์œผ๋‚˜ ํฌ๋‚˜ ํฐ ๋‹จ์ ์ด ์žˆ๋‹ค. legacy model์˜ ์ง€์›์ด ์˜์›ํ•˜์ง€ ์•Š๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ์˜ˆ๋ฅผ ๋“ค๋ฉด ๋‚ด๊ฐ€ ๋ชจ์€ ์ž๋ฃŒ๋ฅผ ๋ชจ๋‘ vectorํ™” ์‹œ์ผœ vectordb๋ฅผ ๊ตฌ์ถ•ํ•˜๊ณ  RAG๋‚˜ RetrievalQA๋ฅผ ํ†ตํ•ด ์งˆ์˜๋ฅผ ํ–ˆ๋Š”๋ฐ ์ž˜ ๋‚˜์˜ค๋˜ ๋‹ต๋ณ€์ด ์กฐ๊ธˆ์”ฉ ํ‹€์–ด์งˆ ์ˆ˜ ์žˆ๋‹ค. ๊ทธ ์›์ธ์œผ๋กœ text-embedding-ada-002๋กœ ๊ตฌ์ถ•ํ•ด ๋†“์€ embedding vector ๊ฐ’๋“ค์ด text-embedding-ada-003์—์„œ๋Š” ์œ ํšจํ•˜์ง€ ์•Š์•„ ๊ทธ๋ ‡๋‹ค. ๋”ฐ๋ผ์„œ ์ด๋Ÿฌํ•œ ์ผ์ด ์—†์œผ๋ ค๋ฉด t..
[draw.io] sql๋ฌธ ๊ฐ€์ ธ์˜ค๊ธฐ
ยท
๐Ÿ› ๏ธ Tools
ERD ๊ณต์œ  ๋งˆ์Šคํ„ฐhttps://www.erdcloud.com/ ERDCloudDraw ERD with your team members. All states are shared in real time. And it's FREE. Database modeling tool.www.erdcloud.com ERDCloud๋ฅผ ์ด์šฉํ•˜๋ฉด ํ˜„์žฌ ์‚ฌ์šฉ๋˜๋Š” ์œ ๋ช… ํ”Œ๋žซํผ์˜ ์•„ํ‚คํ…์ฒ˜๋ฅผ ๊ฐ„์ ‘์ ์œผ๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ๋‹ค. ์‹ค์ œ๋กœ ์œ ํšจํ•œ ์ž‘์—…์ธ์ง€๋Š” ๋ชจ๋ฅด๋‚˜ ์˜คํ”ˆ์œผ๋กœ ๊ณต์œ ๋œ ERD ์†Œ์Šค๋“ค์ด ์ƒ๋‹นํžˆ ๋งŽ๋‹ค. ์ด๋ ‡๊ฒŒ ์ž‘์„ฑ๋œ ERD๋ฅผ draw.io๋กœ ๊ฐ€์ ธ์™€ ์ผ์„ ์ž๋™ํ™” ์‹œ์ผœ๋ณด์ž.  ์œ„์˜ ์˜ˆ์‹œ๋Š” ๋ฐฐ๋‹ฌ์˜ ๋ฏผ์กฑ ERD ์˜ˆ์‹œ์ด๋‹ค. ์œ ํšจํ•œ์ง€๋Š” ๋ชจ๋ฅด๋‚˜ ERD ํ…œํ”Œ๋ฆฟ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ธฐ ์ข‹๋‹ค. ์šฐ์ธกํ•˜๋‹จ์˜๋‚ด๋ณด๋‚ด๊ธฐ > SQL ๋‹ค์šด๋กœ๋“œ๋กœ sql ๋ฌธ์„ ๊ฐ€์ ธ์™€ ๋ฐ”๋กœ DB์—..
[crewAI] Multi-agent Custormer Support Automation (3)
ยท
๐Ÿ› ๏ธ Tools
L3: Multi-agent Custormer Support AutomationMulti-agent๋ฅผ ํ™œ์šฉํ•œ ๊ณ ๊ฐ ์ง€์› ์ž๋™ํ™” ์‹œ์Šคํ…œ Role PlayingFocusToolsCooperationGuardrailsMemory ํ•„์ˆ˜ ํŒจํ‚ค์ง€ ์„ค์น˜!pip install crewai==0.28.8 crewai_tools==0.1.6 langchain_community==0.0.29 In [44]:# ๊ฐ„๋‹จํ•œ warning ์ถœ๋ ฅ ๋ฌด์‹œimport warningswarnings.filterwarnings(action='ignore')In [45]:# crewai ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ importfrom crewai import Agent, Task, CrewIn [46]:# utils.py# Add your utilities or..
[CrewAI] Key elements of AI agent (2)
ยท
๐Ÿ› ๏ธ Tools
Key elements of AI agentRole Playingrole์— ๋”ฐ๋ผ agent์˜ ์‘๋‹ต์ด ๋‹ฌ๋ผ์งTesla์˜ ์ฃผ๊ฐ€๋ฅผ ๋ถ„์„ํ•ด ๋‹ฌ๋ผ๊ณ  ์š”์ฒญํ•ด๋ณด์ž.1. give me an analysis on tesla stock.๋”๋ณด๊ธฐAs of May 2024, Tesla's stock (TSLA) is facing a complex landscape with both significant challenges and potential opportunities.Current Performance and Outlook:Tesla's stock is currently trading around $177, having experienced a decline of approximately 31% year-to-dateโ€‹ (..
[LLM Agents] Multi AI Agent System with crewAI
ยท
๐Ÿ› ๏ธ Tools
Multi AI Agent System with crewAICrewAI Framework๋ฅผ ํ†ตํ•ด Multi-Agent ์ƒ์„ฑํ•˜๊ณ  ๋‹ค์ค‘ Task๋ฅผ Agent๋“ค๊ณผ ์ƒํ˜ธ ์—ฐ๊ณ„ํ•ด ๋ชฉํ‘œ์— ๊ฐ€๊นŒ์šด ๋‹ต์„ ๊ตฌํ•œ๋‹ค. 2. AI Agents(1) Agents ์—ญํ•  agent๊ฐ€ task๋ฅผ ์ˆ˜ํ–‰ํ•˜๊ณ , ๊ทธ ๊ฒฐ๊ณผ๋ฅผ answer๋กœ ๋ฐ˜ํ™˜ํ•œ๋‹ค. ๊ฒฐ๊ณผ๊ฐ€ ์ œ๋Œ€๋กœ ๋˜์ง€ ์•Š์„ ๋•Œ agent๋Š” ๋‹ค์‹œ task๋ฅผ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค.  Agent์˜ ๊ตฌ์„ฑ์š”์†Œ๋กœ Tools๊ฐ€ ์žˆ๋‹ค. ๋‹ค๋ฅธ ํ”„๋ ˆ์ž„์›Œํฌ์—์„œ๋Š” SKU ๋˜๋Š” function์ด๋ผ๋Š” ์šฉ์–ด๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค.Tools๋Š” agent๊ฐ€ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋Š” task๋ฅผ ์ •์˜ํ•œ๋‹ค. ์ด๋ฅผ ํ†ตํ•ด API, data ์ ‘๊ทผ ๋“ฑ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.Langchain์—์„œ ์‚ฌ์šฉํ•˜๋Š” Tool์˜ ์—ญํ• ๊ณผ ๊ฐ™๊ณ  crewAI์—์„œ๋Š” T..
๋‹คํ–ˆ๋‹ค
'๐Ÿ› ๏ธ Tools' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๊ธ€ ๋ชฉ๋ก