Create and chat with your own AI idol group
Project description
AIdol Backend
AI 아이돌 그룹 생성 및 채팅 Python 패키지
주요 기능
- AI 아이돌 그룹/멤버 CRUD
- Google Gemini 이미지 생성 (엠블럼, 프로필)
- 텍스트 채팅 (페르소나 기반 응답)
- Buppy 통합 Adapter 패턴
설치
cd backend
poetry install
poetry run uvicorn main:app --reload
API 문서:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
사용법
FastAPI 통합
from aidol.api.aidol import AIdolRouter
from aidol.api.companion import CompanionRouter
from aidol.factories import AIdolRepositoryFactory, CompanionRepositoryFactory
# AIdol 라우터
aidol_router = AIdolRouter(
repository_factory=AIdolRepositoryFactory(),
google_settings=google_settings,
image_storage=image_storage,
)
# Companion 라우터
companion_router = CompanionRouter(
repository_factory=CompanionRepositoryFactory(),
)
app.include_router(aidol_router.router, prefix="/api/aidol")
app.include_router(companion_router.router, prefix="/api/aidol")
개발
poetry install
make lint
make type-check
make unit-test
make format
환경 변수
이미지 생성 인증 (선택, ADC 지원)
| 변수 | 설명 |
|---|---|
GOOGLE_API_KEY |
Google API 키 (Google AI API) |
GOOGLE_CLOUD_PROJECT |
GCP 프로젝트 ID (Vertex AI) |
인증 방법:
Option 1: Google AI API (API Key)
export GOOGLE_API_KEY=your-api-key
Option 2: Vertex AI (ADC)
export GOOGLE_CLOUD_PROJECT=your-project-id
gcloud auth application-default login # 로컬 개발
참고: Vertex AI 사용 시
location=global이 하드코딩되어 있습니다 (Gemini 이미지 생성 모델 요구사항).
선택
| 변수 | 기본값 | 설명 |
|---|---|---|
AIDOL_OPENAI_MODEL |
gpt-4o-mini |
채팅 응답 LLM 모델 |
참고: 데이터베이스, 모델 등 추가 설정은 기본값으로 로컬 개발 가능합니다. 변경이 필요한 경우
aidol/내 Settings 클래스를 참고하세요.
의존성
- aioia-core (공통 인프라)
- FastAPI, SQLAlchemy, Pydantic
- Google Generative AI (이미지 생성)
- OpenAI (채팅)
- Pillow (이미지 처리)
라이선스
Apache 2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_aidol-2.7.0.tar.gz.
File metadata
- Download URL: py_aidol-2.7.0.tar.gz
- Upload date:
- Size: 64.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4be3ff92a2ff645d46dfb72b4624a9b417f3f86d68f23f68b5162a53faa96060
|
|
| MD5 |
5903e2cda6ac188902acc83f7928a3bf
|
|
| BLAKE2b-256 |
cf1b5f7c715bc7238f110e6a426e4de8058afdea5aa4962eedc0beccc8427e5d
|
Provenance
The following attestation bundles were made for py_aidol-2.7.0.tar.gz:
Publisher:
publish-backend.yml on algorima/aidol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_aidol-2.7.0.tar.gz -
Subject digest:
4be3ff92a2ff645d46dfb72b4624a9b417f3f86d68f23f68b5162a53faa96060 - Sigstore transparency entry: 1004843407
- Sigstore integration time:
-
Permalink:
algorima/aidol@596ec09f636dac0573bff1fc6a1c3ed77a697384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/algorima
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-backend.yml@596ec09f636dac0573bff1fc6a1c3ed77a697384 -
Trigger Event:
push
-
Statement type:
File details
Details for the file py_aidol-2.7.0-py3-none-any.whl.
File metadata
- Download URL: py_aidol-2.7.0-py3-none-any.whl
- Upload date:
- Size: 87.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
417be2add08e18d9d347fa58085ed3ae40e66c6b4af7e05632bb6f975be2569e
|
|
| MD5 |
7fdd543776834422b64ecbb8ef8266c5
|
|
| BLAKE2b-256 |
b649b90a54550086968c6a7f3086e748bedba017069ea360ac327789f50db5d7
|
Provenance
The following attestation bundles were made for py_aidol-2.7.0-py3-none-any.whl:
Publisher:
publish-backend.yml on algorima/aidol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_aidol-2.7.0-py3-none-any.whl -
Subject digest:
417be2add08e18d9d347fa58085ed3ae40e66c6b4af7e05632bb6f975be2569e - Sigstore transparency entry: 1004843408
- Sigstore integration time:
-
Permalink:
algorima/aidol@596ec09f636dac0573bff1fc6a1c3ed77a697384 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/algorima
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-backend.yml@596ec09f636dac0573bff1fc6a1c3ed77a697384 -
Trigger Event:
push
-
Statement type: