728x90

 

https://dify.ai/

 

Dify.AI ยท The Innovation Engine for Generative AI Applications

The next-gen development platform - Easily build and operate generative AI applications. Create Assistants API and GPTs based on any LLMs.

dify.ai

 

Dify

Dify๋Š” ์˜คํ”ˆ ์†Œ์Šค LLMOps ํ”Œ๋žซํผ์œผ๋กœ, ์‚ฌ์šฉ์ž๊ฐ€ AI ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์‰ฝ๊ฒŒ ๊ฐœ๋ฐœํ•˜๊ณ  ์šด์˜ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ง€์›ํ•ฉ๋‹ˆ๋‹ค. ์‹œ๊ฐ์  ์›Œํฌํ”Œ๋กœ ์˜ค์ผ€์ŠคํŠธ๋ ˆ์ด์…˜์„ ํ†ตํ•ด ๋‹ค์–‘ํ•œ AI ๋ชจ๋ธ์„ ํ†ตํ•ฉํ•˜๊ณ , RAG ํŒŒ์ดํ”„๋ผ์ธ ๋ฐ ์—์ด์ „ํŠธ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ, ๋ชจ๋ธ ๊ด€๋ฆฌ์™€ ๋ชจ๋‹ˆํ„ฐ๋ง ๊ธฐ๋Šฅ์„ ํ†ตํ•ด ํ”„๋กœํ† ํƒ€์ž…์—์„œ ํ”„๋กœ๋•์…˜๊นŒ์ง€์˜ ์ „ํ™˜์„ ์‹ ์†ํ•˜๊ฒŒ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 

 

diffy

 

 dify๋Š” ์œ„์— ์‚ฌ์ง„๊ณผ ๊ฐ™์ด llm workflow ์ž‘์„ฑ์„ ๋„์™€์ฃผ๋Š” ๋„๊ตฌ ๋Œ€์‹œ๋ณด๋“œ ํˆด์ž…๋‹ˆ๋‹ค. LLM์œผ๋กœ custom ํ•˜๋ ค๋Š” ์‹œ๋„๊ฐ€ ๋งŽ๋‹ค ๋ณด๋‹ˆ ๋‹ค์–‘ํ•œ ํˆด๋“ค์ด ๋“ฑ์žฅํ–ˆ๋Š”๋ฐ dify์˜ ์žฅ์ ์€ llm์œผ๋กœ workflow๋ฅผ ๋งŒ๋“ค๋ฉด python code๋กœ export ํ•  ์ˆ˜ ์žˆ๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ด ๋•์— dify ์ปค๋ฎค๋‹ˆํ‹ฐ ์ฐธ์—ฌ์ž๋„ ๋น ๋ฅด๊ฒŒ ๋Š˜์–ด๋‚˜๊ณ  ์œ ์šฉํ•œ ๊ธฐ๋Šฅ๋“ค์„ ์—ฌ๋Ÿฌ ์‚ฌ๋žŒ๋“ค๊ณผ ๊ณต์œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 

 

 llm์˜ ์„ฑ๋Šฅ์ด ์ข‹์„ ์ˆ˜๋ก ๋‹จ๊ณ„ ๋ณ„ output ๊ฐ’์˜ ํ€„๋ฆฌํ‹ฐ๊ฐ€ ์ข‹์•„ o1-mini, sonnet, gemini์™€ ๊ฐ™์€ ์œ ๋ฃŒ API๋ฅผ ํ™œ์šฉํ•˜๋Š” ๋ฐ ๋‹ฌ๋Ÿฌ๊ฐ€ ๋น„์‹ธ์ ธ ์ฃผ๋จธ๋‹ˆ ์‚ฌ์ •์ด ๊ฑฑ์ •์ธ ์‚ฌ๋žŒ๋“ค์—๊ฒŒ ๋Œ€์•ˆ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ollama๋กœ ๋กœ์ปฌ์—์„œ model์„ ๊ตฌ๋™ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 

 

 dify๋ฅผ docker๋กœ ์˜ฌ๋ฆฌ๊ณ  desktop์— ์˜ฌ๋ผ๊ฐ„ ollama์™€ ์—ฐ๋™ ํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 

dify ์„ค์น˜

https://github.com/langgenius/dify 

 

GitHub - langgenius/dify: Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow,

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, lettin...

github.com

 

git clone https://github.com/langgenius/dify

 

 

 ์„ค์น˜๋œ ๋””๋ ‰ํ„ฐ๋ฆฌ์—์„œ docker compose๋กœ ์„ค์น˜

cd dify
cd docker
cp .env.example .env
docker compose up -d

 

 ์„ค์น˜์™€ docker ๊ตฌ์„ฑ์ด ์™„๋ฃŒ๊ฐ€ ๋˜๋ฉด 80 port๋กœ ์˜ฌ๋ผ๊ฐ€ http://localhost/signin์—์„œ ๊ด€๋ฆฌ์ž ๊ณ„์ •์„ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

ollama ์—ฐ๋™

 desktop ollama๊ฐ€ ์‹คํ–‰ ์ค‘ ์ธ์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค. ( ์„ค์น˜ : https://ollama.com/download)

ollama ps # ์‹คํ–‰ ์ค‘์ธ ๋ชจ๋ธ ํ™•์ธ

 

 

 


  dify > setting > model provider์—์„œ ๋ผ๋งˆ ์•„์ด์ฝ˜์„ ์ฐพ์Šต๋‹ˆ๋‹ค. 

 

https://docs.dify.ai/tutorials/model-configuration/ollama  

 

Integrate Local Models Deployed by Ollama | Dify

 

docs.dify.ai

 

 

 ์—ฌ๊ธฐ์„œ ์ฃผ์˜์ ์ด docker๋กœ ์˜ฌ๋ผ๊ฐ„ dify๋Š” ์™ธ๋ถ€์˜ localhost์™€ ์—ฐ๊ฒฐํ•˜๋ ค๋ฉด localhost ollama๊ฐ€ ์•„๋‹Œ ํฌ์›Œ๋”ฉ์ด ๋œ port๋ฅผ ์‚ฌ์šฉํ•˜๊ฑฐ๋‚˜ docker๋กœ ํฌ์›Œ๋”ฉ์ด ๊ฐ€๋Šฅํ•œ port๋ฅผ ์‚ฌ์šฉํ•ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ณต์‹ ๋ฌธ์„œ์˜ ๋‚ด์šฉ๊ณผ ๊ฐ™์ด http://host.docker.internal:11434๋ฅผ ๊ธฐ์ž…ํ•ด ์ค๋‹ˆ๋‹ค. 

 

์—ฐ๊ฒฐ์ด ์™„๋ฃŒ๋˜๋ฉด ํ…œํ”Œ๋ฆฟ์„ ๊ฐ€์ ธ์™€ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.  

๋ฐ˜์‘ํ˜•
๋‹คํ–ˆ๋‹ค