ai.smithery/cc25a-openai-api-agent-project123123123
Look up the latest stock prices by ticker symbol across global markets. Get current price and esseโฆ
Ask AI about ai.smithery/cc25a-openai-api-agent-project123123123
Powered by Claude ยท Grounded in docs
I know everything about ai.smithery/cc25a-openai-api-agent-project123123123. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
OpenAI API Agent School - Project
๋ณธ ์๋ฃ๋ (์ฃผ)์์ด์์ด์บ์ฌ์์ ๋ง๋ OpenAI API๋ก ๋ฐฐ์ฐ๋ Agent ๊ฐ๋ฐ ์ฒซ๊ฑธ์ (OpenAI API Agent School) ๊ฐ์ ํ๋ก์ ํธ ์๋ฃ์ ๋๋ค.
[0] Install & Build (uv)
# uv Install
curl -LsSf https://astral.sh/uv/install.sh | sh
# uv Build
uv sync --frozen && uv cache prune --ci
[1] ํ๋ก์ ํธ ์ธํ
1.1. ํ๊ฒฝ ๋ณ์ (.env)
- .env ํ์ผ๋ก ์ค์ ํ๊ฑฐ๋ ๋ฐฐํฌ ํ๊ฒฝ์์ ์ง์
OPENAI_API_KEY: Agent ์ฑ ๋๋ ํ์ธํ๋ํ ๋ฐ์ดํฐ๋ฅผ ์ ๋ก๋ํ ๋ ์ฌ์ฉํ OpenAI API ํคPROMPT_IDAgent ์ฑ์์ ์ฌ์ฉํ OpenAI ํ๋กฌํํธ IDTITLE: Agent์ฑ์ ์๋จ ์ ๋ชฉPASSWORD: ๋น๋ฐ๋ฒํธ ์ค์ (๋น์๋ ๊ฒฝ์ฐ ๋๊ตฌ๋ ์ ๊ทผ ๊ฐ๋ฅ)- Agent ์ฑ์์๋ ๋ก๊ทธ์ธํด์ผ ์ ๊ทผ ๊ฐ๋ฅํด์ง
- MCP ์๋ฒ์์๋
?password=<your-password>์ ๊ฐ์ด ์ฟผ๋ฆฌ์คํธ๋ง์ผ๋ก ์ ๋ฌํด์ผ ์ ๊ทผ ๊ฐ๋ฅ
1.2. config.overrides.jsonc
- Agent ์ฑ์์ openai api ์์ฒญ์ responses create ์์ ๋ฎ์ด ์ธ ๊ตฌ์ฑ ๊ฐ
- config.overrides.jsonc ํ์ผ๋ก ์ค์ ํ๊ฑฐ๋ ๋ฐฐํฌ ํ๊ฒฝ์์ ์ง์
- ํ์ผ ์์น
- ํ๋ก์ ํธ ํด๋ (์ฐ์ ์์)
- /etc/secrets/
1.3. tools.py
- Agent ์ฑ์์ Function Calling์ผ๋ก ์ฌ์ฉํ ํจ์.
- ๋๋ MCP ์๋ฒ์์ tool๋ก ์ฌ์ฉํ ํจ์.
- ํ์ผ ์์น: tools.py
[2] ์ฑ ์คํ
์คํ
uv run main.py
-
ํฌํธ: ํ๊ฒฝ๋ณ์
PORT๊ฐ์ด ์ง์ ๋ ๊ฒฝ์ฐ ์ด ๊ฐ์ ์ฌ์ฉํ๋ฉฐ, ๊ทธ๋ ์ง ์์ ๊ฒฝ์ฐ8000์ ์ฌ์ฉํจ. -
agent ์ฑ ์ฃผ์: https://localhost:8000/agent
-
mcp ์๋ฒ ์ฃผ์: https://localhost:8000/mcp
KEEPALIVE_URL
- ์คํ ์ค์ธ ์ฑ์ด ์ผ์ ์๊ฐ ๋์ ์ ์์ด ์์ผ๋ฉด ์ ํด์ํ๊ฐ ๋ ๊ฒฝ์ฐ
KEEPALIVE_URL๋ฅผ github actions์ ํ๊ฒฝ๋ณ์(secrets)์ ์ง์ ํ์ฌ ์ฃผ๊ธฐ์ ์ผ๋ก ์ ์ํ๋ cron ์์ ์ ์ํํ ์ ์์. - Forkํ ๊ฒฝ์ฐ Forkํ ๋ ํฌ์งํ ๋ฆฌ ์ ์ํ์ฌ ์๋จ์ Actions ํญ์์ Actions๋ฅผ ํ์ฑํ ํ๊ณ .github/workflows/keepalive-url.yml ์ ํ์ฑํ ํ์ธ์.
- ๋ ํฌ์งํ ๋ฆฌ > settings > Secrets and Variables > Actions > New repository secret ์ ์ ์ํ์ฌ ์๋์ ๊ฐ์ด ์ ๋ ฅ (Secret์๋ ๋ณธ์ธ์ด ๋ฐฐํฌํ URL๋ก ์ ๋ ฅ)
- ์์
- Name:
KEEPALIVE_URL - Secret:
https://<your-project-name>.onrender.com
- Name:
[3] ํ์ธ ํ๋ ๋ฐ์ดํฐ
.envํ์ผ์ OPENAI_API_KEY๋ฅผ ๋ฑ๋กํด์ผ ์ ์์ ์ผ๋ก ์
๋ก๋ ๊ฐ๋ฅ
3.1. SFT (Supervised Fine-tuning)
- ํด๋ ์์น:
fine_tuning_data/supervised/ - ๋ฐ์ดํฐ ์์ฑ ๋ฐ ์
๋ก๋
uv run fine_tuning_data/supervised/convert_and_upload.py
3.2. DPO (Direct Preference Optimization)
- ํด๋ ์์น:
fine_tuning_data/preference/ - ๋ฐ์ดํฐ ์์ฑ ๋ฐ ์
๋ก๋
uv run fine_tuning_data/preference/convert_and_upload.py
3.3. RFT (Reinforcement Fine-tuning)
- ํด๋ ์์น:
fine_tuning_data/reinforcement/ - ๋ฐ์ดํฐ ์์ฑ ๋ฐ ์
๋ก๋
uv run fine_tuning_data/reinforcement/convert_and_upload.py
