google-cloud-gcp-openai-api
๐ด Drop-in replacement REST API for Vertex AI (PaLM 2, Codey, Gemini) that is compatible with the OpenAI API specifications
ํ์ผ ํ์๊ธฐ
์ต์ข ๋ฒ์ ๋ค์ด๋ก๋ (.zip)- bug_report.md
- config.yml
- feature_request.md
- FUNDING.yml
- PULL_REQUEST_TEMPLATE.md
- bruno.png
- chatbot-ui-chat.png
- chatbot-ui-env.png
- chatbox-settings.png
- cloud-run-env.png
- openai-api-cloud-run-vertex-dark.png
- openai-api-cloud-run-vertex.excalidraw
- openai-api-cloud-run-vertex.png
- vscode-chat.png
- vscode-settings.png
- .gcloudignore
- .gitignore
- .gitpod.yml
- bruno-export.json
- chatbot-ui.sh
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- deploy.sh
- Dockerfile
- LICENSE
- README.md
- requirements.txt
- vertex.py
- Vertex_AI_Chat.ipynb
# ์ค์น ๊ฐ์ด๋
1. ์ฝ๋ ๋ด๋ ค๋ฐ๊ธฐ
git clone https://github.com/Cyclenerd/google-cloud-gcp-openai-api
๊นํ๋ธ์์ ํ๋ก์ ํธ ์ฝ๋ ์ ์ฒด๋ฅผ ๋ด ์ปดํจํฐ๋ก ๋ด๋ ค๋ฐ์ต๋๋ค.
cd google-cloud-gcp-openai-api
๋ฐฉ๊ธ ๋ด๋ ค๋ฐ์ ํ๋ก์ ํธ ํด๋ ์์ผ๋ก ์ด๋ํฉ๋๋ค.
2. Docker
์ฌ์ ์ถ์ฒ์ฌ์ ์ค๋น๋ฌผ
- Git GitHub์์ ํ๋ก์ ํธ ์ฝ๋๋ฅผ ๋ด๋ ค๋ฐ์ผ๋ ค๋ฉด ํ์ํฉ๋๋ค.
- Docker Desktop ์ปจํ ์ด๋๋ฅผ ๋น๋ํ๊ณ ์คํํ๋ ค๋ฉด ํ์ํฉ๋๋ค. ์ค์น ํ ์คํํด์ ๋ฐฑ๊ทธ๋ผ์ด๋์ ์ผ๋์ธ์.
docker build -t google-cloud-gcp-openai-api .
Dockerfile์ ๊ธฐ๋ฐ์ผ๋ก ์คํ ๊ฐ๋ฅํ ์ด๋ฏธ์ง๋ฅผ ๋น๋ํฉ๋๋ค.
docker run -p 8080:80 google-cloud-gcp-openai-api
๋น๋๋ ์ด๋ฏธ์ง๋ฅผ ์ค์ ์ปจํ ์ด๋๋ก ์คํํฉ๋๋ค.
ํฐ๋ฏธ๋์ docker compose ps ๋ฅผ ์
๋ ฅํด ์ปจํ
์ด๋๋ค์ด Up ์ํ์ธ์ง ํ์ธํ์ธ์. README์ ํฌํธ ๋ฒํธ๊ฐ ์ ํ์๋ค๋ฉด ๋ธ๋ผ์ฐ์ ์์ http://localhost:ํฌํธ๋ฒํธ ๋ก ์ ์ํด๋ณด์ธ์.
3. Python
์ฌ์์ฌ์ ์ค๋น๋ฌผ
python3 -m venv .venv && \
ํ์ด์ฌ ์คํฌ๋ฆฝํธ(๋๋ ๋ชจ๋)๋ฅผ ์คํํฉ๋๋ค.
pip install -r requirements.txt
requirements.txt ๋ฑ์ ๋ช ์๋ ํ์ด์ฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์นํฉ๋๋ค.
์๋ฌ ๋ฉ์์ง ์์ด ์คํ๋๊ณ ํฐ๋ฏธ๋์ ์๋ด ๋ฌธ๊ตฌ๊ฐ ์ถ๋ ฅ๋๋ฉด ์ ์์
๋๋ค.
์ด ๋ ํฌ์ README์ ์ ํ ์ค์ ๋ช ๋ น์ด๋ฅผ ๊ทธ๋๋ก ๊ฐ์ ธ์์ต๋๋ค.
// repository documentation
Was this content helpful?
(0 ratings)
