Skip to content

๐ŸŽฎ Go/Python์–ธ์–ด, Fiber ํ”„๋ ˆ์ž„์›Œํฌ ๊ธฐ๋ฐ˜ REST API, LLM์„ ์กฐํ•ฉํ•˜์—ฌ ๋งŒ๋“  '๊ฒŒ์ž„ LoL ๋‹‰๋„ค์ž„ AI ์ œ๋„ˆ๋ ˆ์ดํ„ฐ'

Notifications You must be signed in to change notification settings

MOONisYOUNG/go-py-llm-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ go-py-llm-rest-api

๐Ÿ‘‰ Go/Python์–ธ์–ด, REST API, LLM์„ ์กฐํ•ฉํ•˜์—ฌ ๋งŒ๋“  '๊ฒŒ์ž„ LoL ๋‹‰๋„ค์ž„ AI ์ œ๋„ˆ๋ ˆ์ดํ„ฐ'

โœ… ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ

LLM์„ ํ†ตํ•ด ์ƒ์„ฑํ•œ 'LoL ๊ฒŒ์ž„ ๋‹‰๋„ค์ž„'์„ Fiber ํ”„๋ ˆ์ž„์›Œํฌ ๊ธฐ๋ฐ˜์œผ๋กœ ์ œ์ž‘ํ•œ REST API์— ์ „์†กํ•˜๋Š” ๊ธฐ๋Šฅ์„ ์ฝ”๋“œ๋กœ ๊ตฌํ˜„ํ–ˆ์Šต๋‹ˆ๋‹ค.

์ƒ์„ฑ ๋‚ด์—ญ ์ค‘๋ณต ๊ฒ€์‚ฌ๊ฐ€ ํ•„์š” ์—†๋Š” ๋„๋ฉ”์ธ ์˜์—ญ์„ ์„ ์ •ํ•˜๋Š” ๊ณผ์ •์—์„œ ๊ฝค ๋งŽ์€ ๊ณ ๋ฏผ๊ฑฐ๋ฆฌ๊ฐ€ ํŒŒ์ƒ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
๊ณ ๋ฏผ ๋์— ๊ฒŒ์ž„ 'League of Legends(์•ฝ์นญ: LoL ๋˜๋Š” ๋กค)'์€ ์ค‘๋ณต ๋‹‰๋„ค์ž„์„ ํ—ˆ์šฉํ•œ๋‹ค๋Š” ๊ฒƒ์ด ๊ธฐ์–ต๋‚˜์„œ ํ•ด๋‹น ํ…Œ๋งˆ๋ฅผ ์ฃผ์ œ๋กœ ๊ณ ๋ฅด๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

LLM ํŠน์œ ์˜ 'ํ• ๋ฃจ์‹œ๋„ค์ด์…˜'์„ ์ฐฝ์˜์ ์ธ ์š”์†Œ๋ฅผ ๋ถ€๊ฐ์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ํŠน์ง•์ด๋ผ๊ณ  ์žฌํ•ด์„ํ•˜์—ฌ ์ฝ”๋“œ ์ž‘์—…์— ์ž„ํ–ˆ์Šต๋‹ˆ๋‹ค.
ํ• ๋ฃจ์‹œ๋„ค์ด์…˜ ์ •๋„๋ฅผ ์ œ์–ดํ•  ์ˆ˜ ์žˆ๋Š” temperature ๋ณ€์ˆ˜ ๊ฐ’์„ 1.0์œผ๋กœ ์„ค์ •ํ•จ์œผ๋กœ์จ ๋‹ค์ฑ„๋กœ์šด ๋‹‰๋„ค์ž„์„ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๊ฒŒ๋” ํ–ˆ์Šต๋‹ˆ๋‹ค.
+) ๊ด€๋ จ ๋…ผ๋ฌธ : A Survey on Large Language Model Hallucination via a Creativity Perspective

๋˜ํ•œ LLM ํ”„๋กฌํ”„ํŠธ์— '์žฌ๋ฐŒ์ง€๋งŒ ๋ฌด๋ก€ํ•˜์ง€ ์•Š์€ ๋กค ๋‹‰๋„ค์ž„์„ ์ถ”์ฒœํ•ด ์ฃผ์„ธ์š”.' ๋‚ด์šฉ์„ ํฌํ•จ์‹œํ‚ด์œผ๋กœ์จ ์œ ์ € ๊ฐ„์˜ ๋ถˆ์พŒํ•จ์„ ์ตœ์†Œํ™”์‹œํ‚ฌ ์ˆ˜ ์žˆ๋„๋ก ์„ค์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ”ด ์ฝ”๋“œ ๋™์ž‘ ์ „์— ํ•ด์•ผ ํ•˜๋Š” ์ž‘์—…

  1. 'go-server' ํด๋” ์œ„์น˜์—์„œ 'go build' ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  2. ์•„๋‚˜์ฝ˜๋‹ค ํŒŒ์ด์ฌ ๊ฐ€์ƒํ™˜๊ฒฝ์„ ์„ค์ •ํ•˜๋Š” ๋ช…๋ น์–ด 'conda create -n [๊ฐ€์ƒํ™˜๊ฒฝ ์ด๋ฆ„] python=3.10'๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž ์ •์˜ ๊ฐ’์€ ๋ฐ˜๋“œ์‹œ ๋ฐ”๊พธ์…”์•ผ ํ•ฉ๋‹ˆ๋‹ค.
  3. ๊ฐ€์ƒํ™˜๊ฒฝ์„ ํ™œ์„ฑํ™”ํ•˜๋Š” ๋ช…๋ น์–ด 'conda activate [๊ฐ€์ƒํ™˜๊ฒฝ ์ด๋ฆ„]'์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  4. 'python-llm-post' ํด๋” ์œ„์น˜์—์„œ ํŒŒ์ด์ฌ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ํ™˜๊ฒฝ์„ ์„ค์ •ํ•˜๋Š” ๋ช…๋ น์–ด'pip install -r requirements.txt'๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  5. '.env' ํŒŒ์ผ์—์„œ ๋ฐœ๊ธ‰๋ฐ›์€ OpenAI API key ๊ฐ’์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

๐ŸŸ  ์ฝ”๋“œ ๋™์ž‘ ๋ฐฉ๋ฒ• (Linux ๊ธฐ์ค€ ์ž‘์„ฑ)

  1. 'go-server' ํด๋” ์œ„์น˜์—์„œ './go-server' ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•˜์—ฌ go server๋ฅผ ํ™œ์„ฑํ™”์‹œํ‚ต๋‹ˆ๋‹ค.
  2. 'python-llm-post' ํด๋” ์œ„์น˜์—์„œ 'python llm_post.py' ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  3. ์›น ๋ธŒ๋ผ์šฐ์ € ๋˜๋Š” Postman์—์„œ 'http:// localhost:3000/users'๊ฐ€ ์„ฑ๊ณต์ ์œผ๋กœ ์ž˜ ๋™์ž‘ํ•˜๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

๐ŸŸข ์ฝ”๋“œ ์‹คํ–‰ ๊ฒฐ๊ณผ

image

image

About

๐ŸŽฎ Go/Python์–ธ์–ด, Fiber ํ”„๋ ˆ์ž„์›Œํฌ ๊ธฐ๋ฐ˜ REST API, LLM์„ ์กฐํ•ฉํ•˜์—ฌ ๋งŒ๋“  '๊ฒŒ์ž„ LoL ๋‹‰๋„ค์ž„ AI ์ œ๋„ˆ๋ ˆ์ดํ„ฐ'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published