diff --git a/.gitignore b/.gitignore index 7a816402..ee07fdcc 100644 --- a/.gitignore +++ b/.gitignore @@ -231,3 +231,10 @@ spellbook/litellm/config.dev.yaml .env.aws .aws.env spellbook/kotaemon/ktem_app_data + +# librechat Logs +spellbook/librechat/data-node +spellbook/librechat/meili_data* +spellbook/librechat/data/ +spellbook/librechat/logs +*.log diff --git a/docs/release_notes/header_image/release_header_latest.png b/docs/release_notes/header_image/release_header_latest.png index dff8ad7a..e6af093a 100644 Binary files a/docs/release_notes/header_image/release_header_latest.png and b/docs/release_notes/header_image/release_header_latest.png differ diff --git a/docs/release_notes/header_image/release_header_v1.22.0.png b/docs/release_notes/header_image/release_header_v1.22.0.png new file mode 100644 index 00000000..e6af093a Binary files /dev/null and b/docs/release_notes/header_image/release_header_v1.22.0.png differ diff --git a/spellbook/librechat/.SourceSageignore b/spellbook/librechat/.SourceSageignore new file mode 100644 index 00000000..65fc46e3 --- /dev/null +++ b/spellbook/librechat/.SourceSageignore @@ -0,0 +1,74 @@ +.git +__pycache__ +LICENSE +output.md +assets +Style-Bert-VITS2 +output +streamlit +SourceSage.md +data +.gitignore +.SourceSageignore +*.png +Changelog +SourceSageAssets +SourceSageAssetsDemo +__pycache__ +.pyc +**/__pycache__/** +modules\__pycache__ +.svg +sourcesage.egg-info +.pytest_cache +dist +build +.env +example + +.gaiah.md +.Gaiah.md +tmp.md +tmp2.md +.SourceSageAssets +tests +template +aira.egg-info +aira.Gaiah.md +README_template.md + +egg-info +oasis_article.egg-info +.harmon_ai +.aira + +article_draft +issue_creator.log +oasis.log + +debug_output +*.log + +html_replacement1.html +html_raw.html +html_content.html +html_with_placeholders.html +markdown_html.html +markdown_text.md +markdown_text2.md + +saved_article.html +memo.md +content.md + +.SourceSageAssets +docs +.github +.venv + +terraform.tfstate +.terraform +.terraform.lock.hcl +terraform.tfstate.backup + +spellbook/litellm/terraform diff --git a/spellbook/librechat/.env.example b/spellbook/librechat/.env.example new file mode 100644 index 00000000..e235b6cb --- /dev/null +++ b/spellbook/librechat/.env.example @@ -0,0 +1,547 @@ +#=====================================================================# +# LibreChat Configuration # +#=====================================================================# +# Please refer to the reference documentation for assistance # +# with configuring your LibreChat environment. # +# # +# https://www.librechat.ai/docs/configuration/dotenv # +#=====================================================================# + +#==================================================# +# Server Configuration # +#==================================================# + +HOST=localhost +PORT=3080 + +MONGO_URI=mongodb://127.0.0.1:27017/LibreChat + +DOMAIN_CLIENT=http://localhost:3080 +DOMAIN_SERVER=http://localhost:3080 + +NO_INDEX=true +# Use the address that is at most n number of hops away from the Express application. +# req.socket.remoteAddress is the first hop, and the rest are looked for in the X-Forwarded-For header from right to left. +# A value of 0 means that the first untrusted address would be req.socket.remoteAddress, i.e. there is no reverse proxy. +# Defaulted to 1. +TRUST_PROXY=1 + +#===============# +# JSON Logging # +#===============# + +# Use when process console logs in cloud deployment like GCP/AWS +CONSOLE_JSON=false + +#===============# +# Debug Logging # +#===============# + +DEBUG_LOGGING=true +DEBUG_CONSOLE=false + +#=============# +# Permissions # +#=============# + +# UID=1000 +# GID=1000 + +#===============# +# Configuration # +#===============# +# Use an absolute path, a relative path, or a URL + +# CONFIG_PATH="/alternative/path/to/librechat.yaml" + +#===================================================# +# Endpoints # +#===================================================# + +# ENDPOINTS=openAI,assistants,azureOpenAI,google,gptPlugins,anthropic + +PROXY= + +#===================================# +# Known Endpoints - librechat.yaml # +#===================================# +# https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints + +# ANYSCALE_API_KEY= +# APIPIE_API_KEY= +# COHERE_API_KEY= +# DEEPSEEK_API_KEY= +# DATABRICKS_API_KEY= +# FIREWORKS_API_KEY= +# GROQ_API_KEY= +# HUGGINGFACE_TOKEN= +# MISTRAL_API_KEY= +# OPENROUTER_KEY= +# PERPLEXITY_API_KEY= +# SHUTTLEAI_API_KEY= +# TOGETHERAI_API_KEY= +# UNIFY_API_KEY= +# XAI_API_KEY= + +#============# +# Anthropic # +#============# + +ANTHROPIC_API_KEY=user_provided +# ANTHROPIC_MODELS=claude-3-7-sonnet-latest,claude-3-7-sonnet-20250219,claude-3-5-haiku-20241022,claude-3-5-sonnet-20241022,claude-3-5-sonnet-latest,claude-3-5-sonnet-20240620,claude-3-opus-20240229,claude-3-sonnet-20240229,claude-3-haiku-20240307,claude-2.1,claude-2,claude-1.2,claude-1,claude-1-100k,claude-instant-1,claude-instant-1-100k +# ANTHROPIC_REVERSE_PROXY= + +#============# +# Azure # +#============# + +# Note: these variables are DEPRECATED +# Use the `librechat.yaml` configuration for `azureOpenAI` instead +# You may also continue to use them if you opt out of using the `librechat.yaml` configuration + +# AZURE_OPENAI_DEFAULT_MODEL=gpt-3.5-turbo # Deprecated +# AZURE_OPENAI_MODELS=gpt-3.5-turbo,gpt-4 # Deprecated +# AZURE_USE_MODEL_AS_DEPLOYMENT_NAME=TRUE # Deprecated +# AZURE_API_KEY= # Deprecated +# AZURE_OPENAI_API_INSTANCE_NAME= # Deprecated +# AZURE_OPENAI_API_DEPLOYMENT_NAME= # Deprecated +# AZURE_OPENAI_API_VERSION= # Deprecated +# AZURE_OPENAI_API_COMPLETIONS_DEPLOYMENT_NAME= # Deprecated +# AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME= # Deprecated +# PLUGINS_USE_AZURE="true" # Deprecated + +#=================# +# AWS Bedrock # +#=================# + +# BEDROCK_AWS_DEFAULT_REGION=us-east-1 # A default region must be provided +# BEDROCK_AWS_ACCESS_KEY_ID=someAccessKey +# BEDROCK_AWS_SECRET_ACCESS_KEY=someSecretAccessKey +# BEDROCK_AWS_SESSION_TOKEN=someSessionToken + +# Note: This example list is not meant to be exhaustive. If omitted, all known, supported model IDs will be included for you. +# BEDROCK_AWS_MODELS=anthropic.claude-3-5-sonnet-20240620-v1:0,meta.llama3-1-8b-instruct-v1:0 + +# See all Bedrock model IDs here: https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns + +# Notes on specific models: +# The following models are not support due to not supporting streaming: +# ai21.j2-mid-v1 + +# The following models are not support due to not supporting conversation history: +# ai21.j2-ultra-v1, cohere.command-text-v14, cohere.command-light-text-v14 + +#============# +# Google # +#============# + +GOOGLE_KEY=user_provided + +# GOOGLE_REVERSE_PROXY= +# Some reverse proxies do not support the X-goog-api-key header, uncomment to pass the API key in Authorization header instead. +# GOOGLE_AUTH_HEADER=true + +# Gemini API (AI Studio) +# GOOGLE_MODELS=gemini-2.0-flash-exp,gemini-2.0-flash-thinking-exp-1219,gemini-exp-1121,gemini-exp-1114,gemini-1.5-flash-latest,gemini-1.0-pro,gemini-1.0-pro-001,gemini-1.0-pro-latest,gemini-1.0-pro-vision-latest,gemini-1.5-pro-latest,gemini-pro,gemini-pro-vision + +# Vertex AI +# GOOGLE_MODELS=gemini-1.5-flash-preview-0514,gemini-1.5-pro-preview-0514,gemini-1.0-pro-vision-001,gemini-1.0-pro-002,gemini-1.0-pro-001,gemini-pro-vision,gemini-1.0-pro + +# GOOGLE_TITLE_MODEL=gemini-pro + +# GOOGLE_LOC=us-central1 + +# Google Safety Settings +# NOTE: These settings apply to both Vertex AI and Gemini API (AI Studio) +# +# For Vertex AI: +# To use the BLOCK_NONE setting, you need either: +# (a) Access through an allowlist via your Google account team, or +# (b) Switch to monthly invoiced billing: https://cloud.google.com/billing/docs/how-to/invoiced-billing +# +# For Gemini API (AI Studio): +# BLOCK_NONE is available by default, no special account requirements. +# +# Available options: BLOCK_NONE, BLOCK_ONLY_HIGH, BLOCK_MEDIUM_AND_ABOVE, BLOCK_LOW_AND_ABOVE +# +# GOOGLE_SAFETY_SEXUALLY_EXPLICIT=BLOCK_ONLY_HIGH +# GOOGLE_SAFETY_HATE_SPEECH=BLOCK_ONLY_HIGH +# GOOGLE_SAFETY_HARASSMENT=BLOCK_ONLY_HIGH +# GOOGLE_SAFETY_DANGEROUS_CONTENT=BLOCK_ONLY_HIGH +# GOOGLE_SAFETY_CIVIC_INTEGRITY=BLOCK_ONLY_HIGH + +#============# +# OpenAI # +#============# + +OPENAI_API_KEY=user_provided +# OPENAI_MODELS=o1,o1-mini,o1-preview,gpt-4o,gpt-4.5-preview,chatgpt-4o-latest,gpt-4o-mini,gpt-3.5-turbo-0125,gpt-3.5-turbo-0301,gpt-3.5-turbo,gpt-4,gpt-4-0613,gpt-4-vision-preview,gpt-3.5-turbo-0613,gpt-3.5-turbo-16k-0613,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview,gpt-3.5-turbo-1106,gpt-3.5-turbo-instruct,gpt-3.5-turbo-instruct-0914,gpt-3.5-turbo-16k + +DEBUG_OPENAI=false + +# TITLE_CONVO=false +# OPENAI_TITLE_MODEL=gpt-4o-mini + +# OPENAI_SUMMARIZE=true +# OPENAI_SUMMARY_MODEL=gpt-4o-mini + +# OPENAI_FORCE_PROMPT=true + +# OPENAI_REVERSE_PROXY= + +# OPENAI_ORGANIZATION= + +#====================# +# Assistants API # +#====================# + +ASSISTANTS_API_KEY=user_provided +# ASSISTANTS_BASE_URL= +# ASSISTANTS_MODELS=gpt-4o,gpt-4o-mini,gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview + +#==========================# +# Azure Assistants API # +#==========================# + +# Note: You should map your credentials with custom variables according to your Azure OpenAI Configuration +# The models for Azure Assistants are also determined by your Azure OpenAI configuration. + +# More info, including how to enable use of Assistants with Azure here: +# https://www.librechat.ai/docs/configuration/librechat_yaml/ai_endpoints/azure#using-assistants-with-azure + +#============# +# Plugins # +#============# + +# PLUGIN_MODELS=gpt-4o,gpt-4o-mini,gpt-4,gpt-4-turbo-preview,gpt-4-0125-preview,gpt-4-1106-preview,gpt-4-0613,gpt-3.5-turbo,gpt-3.5-turbo-0125,gpt-3.5-turbo-1106,gpt-3.5-turbo-0613 + +DEBUG_PLUGINS=true + +CREDS_KEY=f34be427ebb29de8d88c107a71546019685ed8b241d8f2ed00c3df97ad2566f0 +CREDS_IV=e2341419ec3dd3d19b13a1a87fafcbfb + +# Azure AI Search +#----------------- +AZURE_AI_SEARCH_SERVICE_ENDPOINT= +AZURE_AI_SEARCH_INDEX_NAME= +AZURE_AI_SEARCH_API_KEY= + +AZURE_AI_SEARCH_API_VERSION= +AZURE_AI_SEARCH_SEARCH_OPTION_QUERY_TYPE= +AZURE_AI_SEARCH_SEARCH_OPTION_TOP= +AZURE_AI_SEARCH_SEARCH_OPTION_SELECT= + +# DALL·E +#---------------- +# DALLE_API_KEY= +# DALLE3_API_KEY= +# DALLE2_API_KEY= +# DALLE3_SYSTEM_PROMPT= +# DALLE2_SYSTEM_PROMPT= +# DALLE_REVERSE_PROXY= +# DALLE3_BASEURL= +# DALLE2_BASEURL= + +# DALL·E (via Azure OpenAI) +# Note: requires some of the variables above to be set +#---------------- +# DALLE3_AZURE_API_VERSION= +# DALLE2_AZURE_API_VERSION= + +# Flux +#----------------- +FLUX_API_BASE_URL=https://api.us1.bfl.ai +# FLUX_API_BASE_URL = 'https://api.bfl.ml'; + +# Get your API key at https://api.us1.bfl.ai/auth/profile +# FLUX_API_KEY= + +# Google +#----------------- +GOOGLE_SEARCH_API_KEY= +GOOGLE_CSE_ID= + +# YOUTUBE +#----------------- +YOUTUBE_API_KEY= + +# SerpAPI +#----------------- +SERPAPI_API_KEY= + +# Stable Diffusion +#----------------- +SD_WEBUI_URL=http://host.docker.internal:7860 + +# Tavily +#----------------- +TAVILY_API_KEY= + +# Traversaal +#----------------- +TRAVERSAAL_API_KEY= + +# WolframAlpha +#----------------- +WOLFRAM_APP_ID= + +# Zapier +#----------------- +ZAPIER_NLA_API_KEY= + +#==================================================# +# Search # +#==================================================# + +SEARCH=true +MEILI_NO_ANALYTICS=true +MEILI_HOST=http://0.0.0.0:7700 +MEILI_MASTER_KEY=DrhYf7zENyR6AlUCKmnz0eYASOQdl6zxH7s7MKFSfFCt + +# Optional: Disable indexing, useful in a multi-node setup +# where only one instance should perform an index sync. +# MEILI_NO_SYNC=true + +#==================================================# +# Speech to Text & Text to Speech # +#==================================================# + +STT_API_KEY= +TTS_API_KEY= + +#==================================================# +# RAG # +#==================================================# +# More info: https://www.librechat.ai/docs/configuration/rag_api + +# RAG_OPENAI_BASEURL= +# RAG_OPENAI_API_KEY= +# RAG_USE_FULL_CONTEXT= +# EMBEDDINGS_PROVIDER=openai +# EMBEDDINGS_MODEL=text-embedding-3-small + +#===================================================# +# User System # +#===================================================# + +#========================# +# Moderation # +#========================# + +OPENAI_MODERATION=false +OPENAI_MODERATION_API_KEY= +# OPENAI_MODERATION_REVERSE_PROXY= + +BAN_VIOLATIONS=true +BAN_DURATION=1000 * 60 * 60 * 2 +BAN_INTERVAL=20 + +LOGIN_VIOLATION_SCORE=1 +REGISTRATION_VIOLATION_SCORE=1 +CONCURRENT_VIOLATION_SCORE=1 +MESSAGE_VIOLATION_SCORE=1 +NON_BROWSER_VIOLATION_SCORE=20 + +LOGIN_MAX=7 +LOGIN_WINDOW=5 +REGISTER_MAX=5 +REGISTER_WINDOW=60 + +LIMIT_CONCURRENT_MESSAGES=true +CONCURRENT_MESSAGE_MAX=2 + +LIMIT_MESSAGE_IP=true +MESSAGE_IP_MAX=40 +MESSAGE_IP_WINDOW=1 + +LIMIT_MESSAGE_USER=false +MESSAGE_USER_MAX=40 +MESSAGE_USER_WINDOW=1 + +ILLEGAL_MODEL_REQ_SCORE=5 + +#========================# +# Balance # +#========================# + +CHECK_BALANCE=false +# START_BALANCE=20000 # note: the number of tokens that will be credited after registration. + +#========================# +# Registration and Login # +#========================# + +ALLOW_EMAIL_LOGIN=true +ALLOW_REGISTRATION=true +ALLOW_SOCIAL_LOGIN=false +ALLOW_SOCIAL_REGISTRATION=false +ALLOW_PASSWORD_RESET=false +# ALLOW_ACCOUNT_DELETION=true # note: enabled by default if omitted/commented out +ALLOW_UNVERIFIED_EMAIL_LOGIN=true + +SESSION_EXPIRY=1000 * 60 * 15 +REFRESH_TOKEN_EXPIRY=(1000 * 60 * 60 * 24) * 7 + +JWT_SECRET=16f8c0ef4a5d391b26034086c628469d3f9f497f08163ab9b40137092f2909ef +JWT_REFRESH_SECRET=eaa5191f2914e30b9387fd84e254e4ba6fc51b4654968a9b0803b456a54b8418 + +# Discord +DISCORD_CLIENT_ID= +DISCORD_CLIENT_SECRET= +DISCORD_CALLBACK_URL=/oauth/discord/callback + +# Facebook +FACEBOOK_CLIENT_ID= +FACEBOOK_CLIENT_SECRET= +FACEBOOK_CALLBACK_URL=/oauth/facebook/callback + +# GitHub +GITHUB_CLIENT_ID= +GITHUB_CLIENT_SECRET= +GITHUB_CALLBACK_URL=/oauth/github/callback +# GitHub Enterprise +# GITHUB_ENTERPRISE_BASE_URL= +# GITHUB_ENTERPRISE_USER_AGENT= + +# Google +GOOGLE_CLIENT_ID= +GOOGLE_CLIENT_SECRET= +GOOGLE_CALLBACK_URL=/oauth/google/callback + +# Apple +APPLE_CLIENT_ID= +APPLE_TEAM_ID= +APPLE_KEY_ID= +APPLE_PRIVATE_KEY_PATH= +APPLE_CALLBACK_URL=/oauth/apple/callback + +# OpenID +OPENID_CLIENT_ID= +OPENID_CLIENT_SECRET= +OPENID_ISSUER= +OPENID_SESSION_SECRET= +OPENID_SCOPE="openid profile email" +OPENID_CALLBACK_URL=/oauth/openid/callback +OPENID_REQUIRED_ROLE= +OPENID_REQUIRED_ROLE_TOKEN_KIND= +OPENID_REQUIRED_ROLE_PARAMETER_PATH= +# Set to determine which user info property returned from OpenID Provider to store as the User's username +OPENID_USERNAME_CLAIM= +# Set to determine which user info property returned from OpenID Provider to store as the User's name +OPENID_NAME_CLAIM= + +OPENID_BUTTON_LABEL= +OPENID_IMAGE_URL= + +# LDAP +LDAP_URL= +LDAP_BIND_DN= +LDAP_BIND_CREDENTIALS= +LDAP_USER_SEARCH_BASE= +LDAP_SEARCH_FILTER=mail={{username}} +LDAP_CA_CERT_PATH= +# LDAP_TLS_REJECT_UNAUTHORIZED= +# LDAP_LOGIN_USES_USERNAME=true +# LDAP_ID= +# LDAP_USERNAME= +# LDAP_EMAIL= +# LDAP_FULL_NAME= + +#========================# +# Email Password Reset # +#========================# + +EMAIL_SERVICE= +EMAIL_HOST= +EMAIL_PORT=25 +EMAIL_ENCRYPTION= +EMAIL_ENCRYPTION_HOSTNAME= +EMAIL_ALLOW_SELFSIGNED= +EMAIL_USERNAME= +EMAIL_PASSWORD= +EMAIL_FROM_NAME= +EMAIL_FROM=noreply@librechat.ai + +#========================# +# Firebase CDN # +#========================# + +FIREBASE_API_KEY= +FIREBASE_AUTH_DOMAIN= +FIREBASE_PROJECT_ID= +FIREBASE_STORAGE_BUCKET= +FIREBASE_MESSAGING_SENDER_ID= +FIREBASE_APP_ID= + +#========================# +# Shared Links # +#========================# + +ALLOW_SHARED_LINKS=true +ALLOW_SHARED_LINKS_PUBLIC=true + +#==============================# +# Static File Cache Control # +#==============================# + +# Leave commented out to use defaults: 1 day (86400 seconds) for s-maxage and 2 days (172800 seconds) for max-age +# NODE_ENV must be set to production for these to take effect +# STATIC_CACHE_MAX_AGE=172800 +# STATIC_CACHE_S_MAX_AGE=86400 + +# If you have another service in front of your LibreChat doing compression, disable express based compression here +# DISABLE_COMPRESSION=true + +#===================================================# +# UI # +#===================================================# + +APP_TITLE=LibreChat +# CUSTOM_FOOTER="My custom footer" +HELP_AND_FAQ_URL=https://librechat.ai + +# SHOW_BIRTHDAY_ICON=true + +# Google tag manager id +#ANALYTICS_GTM_ID=user provided google tag manager id + +#===============# +# REDIS Options # +#===============# + +# REDIS_URI=10.10.10.10:6379 +# USE_REDIS=true + +# USE_REDIS_CLUSTER=true +# REDIS_CA=/path/to/ca.crt + +#==================================================# +# Others # +#==================================================# +# You should leave the following commented out # + +# NODE_ENV= + +# E2E_USER_EMAIL= +# E2E_USER_PASSWORD= + +#=====================================================# +# Cache Headers # +#=====================================================# +# Headers that control caching of the index.html # +# Default configuration prevents caching to ensure # +# users always get the latest version. Customize # +# only if you understand caching implications. # + +# INDEX_HTML_CACHE_CONTROL=no-cache, no-store, must-revalidate +# INDEX_HTML_PRAGMA=no-cache +# INDEX_HTML_EXPIRES=0 + +# no-cache: Forces validation with server before using cached version +# no-store: Prevents storing the response entirely +# must-revalidate: Prevents using stale content when offline + +#=====================================================# +# OpenWeather # +#=====================================================# +OPENWEATHER_API_KEY= diff --git a/spellbook/librechat/README.md b/spellbook/librechat/README.md new file mode 100644 index 00000000..740efb33 --- /dev/null +++ b/spellbook/librechat/README.md @@ -0,0 +1,162 @@ +
+ +![LiteLLM Module](./assets/header.svg) + +多様なLLMプロバイダーを統一的に扱うためのインフラストラクチャ管理ツールです。[LiteLLM](https://github.com/BerriAI/litellm)をベースに、AWS Bedrock、Anthropic Claude、OpenAI、Google Geminiなど、様々なLLMサービスを一元管理できます。 + +
+ +## 🌟 主な機能 + +### 統一APIインターフェース +- **マルチプロバイダー対応** + - AWS Bedrock (Claude-3シリーズ) + - Anthropic Direct API (Claude-3、Claude-2.1) + - OpenAI (GPT-4/3.5) + - Google Gemini (Pro/Ultra) + - DeepSeek + - その他多数のプロバイダー + +### インフラストラクチャ管理 +- **コンテナ管理** + - Docker Composeによる簡単なデプロイ + - スケーラブルなマイクロサービスアーキテクチャ +- **モニタリング** + - Prometheusによるメトリクス収集 + - 使用状況とパフォーマンスの監視 +- **永続化** + - PostgreSQLによるデータ管理 + - 設定とログの永続化 + +### セキュリティ機能 +- **エッジプロテクション** + - CloudFrontによるコンテンツ配信 + - WAFv2によるIPフィルタリング +- **内部通信** + - プライベートDNSによるサービス間通信 + - VPC内での安全な通信経路 +- **アクセス制御** + - API認証とキー管理 + - トークン使用量の制限と監視 + +## 🚀 クイックスタート + +### 1. 環境設定 + +1. 環境変数とAPIキーの設定: +```bash +cp .env.example .env + +# 必須設定 +LITELLM_MASTER_KEY="your-master-key" # API認証用 +LITELLM_SALT_KEY="your-salt-key" # トークン暗号化用 + +# プロバイダー別APIキー +OPENAI_API_KEY="sk-..." # OpenAI用 +ANTHROPIC_API_KEY="sk-ant-..." # Anthropic用 +GEMINI_API_KEY="AI..." # Google Gemini用 +DEEPSEEK_API_KEY="sk-..." # DeepSeek用 + +# AWS認証情報 +AWS_ACCESS_KEY_ID="AKIA..." +AWS_SECRET_ACCESS_KEY="..." +AWS_DEFAULT_REGION="ap-northeast-1" + +# Vertex AI設定 +GOOGLE_APPLICATION_CREDENTIALS="/app/vertex-ai-key.json" +GOOGLE_PROJECT_ID="your-project-id" +``` + +2. モデル設定 (`config.yaml`): +```yaml +model_list: + - model_name: bedrock/claude-3-5-sonnet + litellm_params: + model: bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0 + aws_region_name: us-east-1 + + - model_name: Vertex_AI/gemini-pro + litellm_params: + model: vertex_ai/gemini-pro + vertex_project: "os.environ/GOOGLE_PROJECT_ID" + vertex_location: "us-central1" +``` + +### 2. インフラストラクチャのデプロイ + +```bash +cd terraform/main-infrastructure +terraform init +terraform apply +``` + +### 3. サービスの起動 + +```bash +docker-compose up -d +``` + +## 🧪 テストツール + +```plaintext +script/ +├─ test_bedrock.py # Bedrockモデル検証 +├─ test_vertex_ai.py # Vertex AI機能確認 +├─ test_embeddings.py # 埋め込みモデル評価 +├─ test_simple_chat.py # 基本的なチャット機能 +├─ check_json_support.py # JSON応答サポート確認 +└─ check_model_params.py # モデルパラメータ検証 +``` + +## 🔍 動作確認 + +### 接続テスト +内部通信の確認: +```bash +python scripts/connectivity_health_check.py +``` + +### API動作確認 +```bash +# シンプルなチャットリクエスト +curl -X POST "https:///v1/chat/completions" \ + -H "Authorization: Bearer ${LITELLM_MASTER_KEY}" \ + -H "Content-Type: application/json" \ + -d '{ + "model": "bedrock/claude-3-5-sonnet", + "messages": [{"role": "user", "content": "Hello!"}] + }' +``` + +## ⚙️ 設定カスタマイズ + +### 基本設定 +- ポート番号: `LITELLM_PORT`(デフォルト: 4000) +- データベースURL: `DATABASE_URL` +- モデル設定: `config.yaml` + +### セキュリティ設定 +- WAFルール: `whitelist-waf.example.csv` +- セキュリティグループ: `terraform.tfvars` +- 内部通信設定: プライベートDNS名 + +## 📝 トラブルシューティング + +1. API接続エラー + - APIキーの確認 + - ネットワーク設定の確認 + - WAFルールの確認 + +2. モデルエラー + - `config.yaml`の設定確認 + - プロバイダーの稼働状態確認 + - クォータ制限の確認 + +3. 内部通信エラー + - DNS設定の確認 + - セキュリティグループの確認 + - VPCエンドポイントの確認 + +## 📄 ライセンス + +このプロジェクトはMITライセンスの下で公開されています。 diff --git a/spellbook/librechat/assets/header.svg b/spellbook/librechat/assets/header.svg new file mode 100644 index 00000000..943dda6a --- /dev/null +++ b/spellbook/librechat/assets/header.svg @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AMATERASU LiteLLM + + + + + + Unified LLM Infrastructure + + + + + + + + + \ No newline at end of file diff --git a/spellbook/librechat/assets/script-header.svg b/spellbook/librechat/assets/script-header.svg new file mode 100644 index 00000000..2ca967b3 --- /dev/null +++ b/spellbook/librechat/assets/script-header.svg @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + 01 + + + + 10 + + + + 11 + + + + 00 + + + + + + + + + + + + + + LiteLLM Test Tools + + + + + + Validation & Integration Suite + + + + + + + + + + + + \ No newline at end of file diff --git a/spellbook/librechat/docker-compose.yml b/spellbook/librechat/docker-compose.yml new file mode 100644 index 00000000..e16f93f4 --- /dev/null +++ b/spellbook/librechat/docker-compose.yml @@ -0,0 +1,72 @@ +# Do not edit this file directly. Use a ‘docker-compose.override.yaml’ file if you can. +# Refer to `docker-compose.override.yaml.example’ for some sample configurations. + +services: + api: + container_name: LibreChat + ports: + - "${PORT}:${PORT}" + depends_on: + - mongodb + - rag_api + image: ghcr.io/danny-avila/librechat-dev:latest + restart: always + user: "${UID}:${GID}" + extra_hosts: + - "host.docker.internal:host-gateway" + environment: + - HOST=0.0.0.0 + - MONGO_URI=mongodb://mongodb:27017/LibreChat + - MEILI_HOST=http://meilisearch:7700 + - RAG_PORT=${RAG_PORT:-8000} + - RAG_API_URL=http://rag_api:${RAG_PORT:-8000} + volumes: + - type: bind + source: ./.env + target: /app/.env + - ./images:/app/client/public/images + - ./uploads:/app/uploads + - ./logs:/app/api/logs + mongodb: + container_name: chat-mongodb + image: mongo + restart: always + user: "${UID}:${GID}" + volumes: + - ./data-node:/data/db + command: mongod --noauth + meilisearch: + container_name: chat-meilisearch + image: getmeili/meilisearch:v1.12.3 + restart: always + user: "${UID}:${GID}" + environment: + - MEILI_HOST=http://meilisearch:7700 + - MEILI_NO_ANALYTICS=true + - MEILI_MASTER_KEY=${MEILI_MASTER_KEY} + volumes: + - ./meili_data_v1.12:/meili_data + vectordb: + container_name: vectordb + image: ankane/pgvector:latest + environment: + POSTGRES_DB: mydatabase + POSTGRES_USER: myuser + POSTGRES_PASSWORD: mypassword + restart: always + volumes: + - pgdata2:/var/lib/postgresql/data + rag_api: + container_name: rag_api + image: ghcr.io/danny-avila/librechat-rag-api-dev-lite:latest + environment: + - DB_HOST=vectordb + - RAG_PORT=${RAG_PORT:-8000} + restart: always + depends_on: + - vectordb + env_file: + - .env + +volumes: + pgdata2: diff --git a/spellbook/librechat/terraform/cloudfront-infrastructure/.SourceSageignore b/spellbook/librechat/terraform/cloudfront-infrastructure/.SourceSageignore new file mode 100644 index 00000000..58710b8b --- /dev/null +++ b/spellbook/librechat/terraform/cloudfront-infrastructure/.SourceSageignore @@ -0,0 +1,56 @@ +.git +__pycache__ +LICENSE +output.md +assets +Style-Bert-VITS2 +output +streamlit +SourceSage.md +data +.gitignore +.SourceSageignore +*.png +Changelog +SourceSageAssets +SourceSageAssetsDemo +__pycache__ +.pyc +**/__pycache__/** +modules/__pycache__ +.svg +sourcesage.egg-info +.pytest_cache +dist +build +.env +example + +.gaiah.md +.Gaiah.md +tmp.md +tmp2.md +.SourceSageAssets +tests +template +aira.egg-info +aira.Gaiah.md +README_template.md +output +.harmon_ai +pegasus_surf.egg-info +.aira + +docs +.github + +.terraform.lock.hcl +terraform.tfstate.backup +poetry.lock +plan.json +plan.out +.terraform +sandbox/s03_ec2_aws_visual/terraform_visualization_prompt.md +diagrams_docs.html +terraform_visualization_prompt.md +terraform.tfstate diff --git a/spellbook/librechat/terraform/cloudfront-infrastructure/README.md b/spellbook/librechat/terraform/cloudfront-infrastructure/README.md new file mode 100644 index 00000000..e6502f37 --- /dev/null +++ b/spellbook/librechat/terraform/cloudfront-infrastructure/README.md @@ -0,0 +1,111 @@ +
+ +![CloudFront Infrastructure](https://raw.githubusercontent.com/Sunwood-ai-labs/AMATERASU/refs/heads/main/spellbook/open-webui/terraform/cloudfront-infrastructure/assets/header.svg) + +
+ +# AWS CloudFront Infrastructure Module + +このリポジトリは、AWSのCloudFrontディストリビューションを設定するための再利用可能なTerraformモジュールを提供します。 + +## 🌟 主な機能 + +- ✅ CloudFrontディストリビューションの作成(カスタムドメイン対応) +- 🛡️ WAFv2によるIPホワイトリスト制御 +- 🌐 Route53でのDNSレコード自動設定 +- 🔒 ACM証明書の自動作成と検証 + +## 📁 ディレクトリ構造 + +``` +cloudfront-infrastructure/ +├── modules/ +│ └── cloudfront/ # メインモジュール +│ ├── main.tf # リソース定義 +│ ├── variables.tf # 変数定義 +│ ├── outputs.tf # 出力定義 +│ └── README.md # モジュールのドキュメント +└── examples/ + └── complete/ # 完全な使用例 + ├── main.tf + ├── variables.tf + ├── outputs.tf + ├── terraform.tfvars.example + └── whitelist-waf.csv.example +``` + +## 🚀 クイックスタート + +1. モジュールの使用例をコピーします: +```bash +cp -r examples/complete your-project/ +cd your-project +``` + +2. 設定ファイルを作成します: +```bash +cp terraform.tfvars.example terraform.tfvars +cp whitelist-waf.csv.example whitelist-waf.csv +``` + +3. terraform.tfvarsを編集して必要な設定を行います: +```hcl +# AWSリージョン設定 +aws_region = "ap-northeast-1" + +# プロジェクト名 +project_name = "your-project-name" + +# オリジンサーバー設定(EC2インスタンス) +origin_domain = "your-ec2-domain.compute.amazonaws.com" + +# ドメイン設定 +domain = "your-domain.com" +subdomain = "your-subdomain" +``` + +4. whitelist-waf.csvを編集してIPホワイトリストを設定します: +```csv +ip,description +192.168.1.1/32,Office Network +10.0.0.1/32,Home Network +``` + +5. Terraformを実行します: +```bash +terraform init +terraform plan +terraform apply +``` + +## 📚 より詳細な使用方法 + +より詳細な使用方法については、[modules/cloudfront/README.md](modules/cloudfront/README.md)を参照してください。 + +## 🔧 カスタマイズ + +このモジュールは以下の要素をカスタマイズできます: + +1. CloudFront設定 + - キャッシュ動作 + - オリジンの設定 + - SSL/TLS設定 + +2. WAF設定 + - IPホワイトリストの管理 + - セキュリティルールのカスタマイズ + +3. DNS設定 + - カスタムドメインの設定 + - Route53との連携 + +## 📝 注意事項 + +- CloudFrontのデプロイには時間がかかる場合があります(15-30分程度) +- DNSの伝播には最大72時間かかる可能性があります +- SSL証明書の検証には数分から数十分かかることがあります +- WAFのIPホワイトリストは定期的なメンテナンスが必要です + +## 🔍 トラブルシューティング + +詳細なトラブルシューティングガイドについては、[modules/cloudfront/README.md](modules/cloudfront/README.md#トラブルシューティング)を参照してください。 diff --git a/spellbook/librechat/terraform/cloudfront-infrastructure/main.tf b/spellbook/librechat/terraform/cloudfront-infrastructure/main.tf new file mode 100644 index 00000000..b11c9a84 --- /dev/null +++ b/spellbook/librechat/terraform/cloudfront-infrastructure/main.tf @@ -0,0 +1,41 @@ +terraform { + required_version = ">= 0.12" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 4.0" + } + } + + backend "local" { + path = "terraform.tfstate" + } +} + +# デフォルトプロバイダー設定 +provider "aws" { + region = var.aws_region +} + +# バージニアリージョン用のプロバイダー設定(CloudFront用) +provider "aws" { + alias = "virginia" + region = "us-east-1" +} + +# CloudFrontモジュールの呼び出し +module "cloudfront" { + source = "../../../open-webui/terraform/cloudfront-infrastructure/modules" + + project_name = var.project_name + aws_region = var.aws_region + origin_domain = var.origin_domain + domain = var.domain + subdomain = var.subdomain + + providers = { + aws = aws + aws.virginia = aws.virginia + } +} diff --git a/spellbook/librechat/terraform/cloudfront-infrastructure/outputs.tf b/spellbook/librechat/terraform/cloudfront-infrastructure/outputs.tf new file mode 100644 index 00000000..c3687573 --- /dev/null +++ b/spellbook/librechat/terraform/cloudfront-infrastructure/outputs.tf @@ -0,0 +1,39 @@ +output "cloudfront_domain_name" { + description = "Domain name of the CloudFront distribution (*.cloudfront.net)" + value = module.cloudfront.cloudfront_domain_name +} + +output "cloudfront_distribution_id" { + description = "ID of the CloudFront distribution" + value = module.cloudfront.cloudfront_distribution_id +} + +output "cloudfront_arn" { + description = "ARN of the CloudFront distribution" + value = module.cloudfront.cloudfront_arn +} + +output "cloudfront_url" { + description = "CloudFrontのURL" + value = module.cloudfront.cloudfront_url +} + +output "subdomain_url" { + description = "サブドメインのURL" + value = module.cloudfront.subdomain_url +} + +output "waf_web_acl_id" { + description = "ID of the WAF Web ACL" + value = module.cloudfront.waf_web_acl_id +} + +output "waf_web_acl_arn" { + description = "ARN of the WAF Web ACL" + value = module.cloudfront.waf_web_acl_arn +} + +output "certificate_arn" { + description = "ARN of the ACM certificate" + value = module.cloudfront.certificate_arn +} diff --git a/spellbook/librechat/terraform/cloudfront-infrastructure/terraform.tfvars.example b/spellbook/librechat/terraform/cloudfront-infrastructure/terraform.tfvars.example new file mode 100644 index 00000000..45301723 --- /dev/null +++ b/spellbook/librechat/terraform/cloudfront-infrastructure/terraform.tfvars.example @@ -0,0 +1,12 @@ +# AWSの設定 +aws_region = "ap-northeast-1" + +# プロジェクト名 +project_name = "example-project" + +# オリジンサーバー設定(EC2インスタンス) +origin_domain = "ec2-xxx-xxx-xxx-xxx.compute.amazonaws.com" + +# ドメイン設定 +domain = "example.com" +subdomain = "app" # 生成されるURL: app.example.com diff --git a/spellbook/librechat/terraform/cloudfront-infrastructure/variables.tf b/spellbook/librechat/terraform/cloudfront-infrastructure/variables.tf new file mode 100644 index 00000000..01576938 --- /dev/null +++ b/spellbook/librechat/terraform/cloudfront-infrastructure/variables.tf @@ -0,0 +1,25 @@ +variable "project_name" { + description = "Name of the project" + type = string +} + +variable "aws_region" { + description = "AWS region for the resources" + type = string + default = "ap-northeast-1" +} + +variable "origin_domain" { + description = "Domain name of the origin (EC2 instance)" + type = string +} + +variable "domain" { + description = "メインドメイン名" + type = string +} + +variable "subdomain" { + description = "サブドメイン名" + type = string +} diff --git a/spellbook/librechat/terraform/main-infrastructure/common_variables.tf b/spellbook/librechat/terraform/main-infrastructure/common_variables.tf new file mode 100644 index 00000000..31c9412c --- /dev/null +++ b/spellbook/librechat/terraform/main-infrastructure/common_variables.tf @@ -0,0 +1,119 @@ +# Common variable definitions + +# プロジェクト名(全リソースの接頭辞として使用) +variable "project_name" { + description = "Name of the project (used as a prefix for all resources)" + type = string +} + +# AWSリージョン +variable "aws_region" { + description = "AWS region where resources will be created" + type = string + default = "ap-northeast-1" +} + +# 既存のVPC ID +variable "vpc_id" { + description = "ID of the existing VPC" + type = string +} + +# VPCのCIDRブロック +variable "vpc_cidr" { + description = "CIDR block for the VPC" + type = string +} + +# 第1パブリックサブネットのID +variable "public_subnet_id" { + description = "ID of the first public subnet" + type = string +} + +# 第2パブリックサブネットのID +variable "public_subnet_2_id" { + description = "ID of the second public subnet" + type = string +} + +# セキュリティグループID +variable "security_group_ids" { + description = "List of security group IDs to attach to the instance" + type = list(string) +} + +# ベースドメイン名 +variable "domain" { + description = "Base domain name for the application" + type = string + default = "sunwood-ai-labs.click" +} + +# サブドメインプレフィックス +variable "subdomain" { + description = "Subdomain prefix for the application" + type = string + default = "amaterasu-open-web-ui-dev" +} + +# プライベートホストゾーンのドメイン名 +variable "domain_internal" { + description = "Domain name for private hosted zone" + type = string +} + +# Route53のゾーンID +variable "route53_internal_zone_id" { + description = "Zone ID for Route53 private hosted zone" + type = string +} + +# EC2インスタンス関連の変数 +# EC2インスタンスのAMI ID +variable "ami_id" { + description = "AMI ID for the EC2 instance (defaults to Ubuntu 22.04 LTS)" + type = string + default = "ami-0d52744d6551d851e" # Ubuntu 22.04 LTS in ap-northeast-1 +} + +# EC2インスタンスタイプ +variable "instance_type" { + description = "Instance type for the EC2 instance" + type = string + default = "t3.medium" +} + +# SSHキーペア名 +variable "key_name" { + description = "Name of the SSH key pair for EC2 instance" + type = string +} + +# 環境変数ファイルのパス +variable "env_file_path" { + description = "Absolute path to the .env file" + type = string +} + +# セットアップスクリプトのパス +variable "setup_script_path" { + description = "Absolute path to the setup_script.sh file" + type = string +} + +# 共通のローカル変数 +locals { + # リソース命名用の共通プレフィックス + name_prefix = "${var.project_name}-" + + # 完全修飾ドメイン名 + fqdn = "${var.subdomain}.${var.domain}" + + # 共通タグ + common_tags = { + Project = var.project_name + Environment = terraform.workspace + ManagedBy = "terraform" + } +} diff --git a/spellbook/librechat/terraform/main-infrastructure/main.tf b/spellbook/librechat/terraform/main-infrastructure/main.tf new file mode 100644 index 00000000..07d3f6be --- /dev/null +++ b/spellbook/librechat/terraform/main-infrastructure/main.tf @@ -0,0 +1,72 @@ +terraform { + required_version = ">= 0.12" +} + +# デフォルトプロバイダー設定 +provider "aws" { + region = var.aws_region +} + +# CloudFront用のACM証明書のためのus-east-1プロバイダー +provider "aws" { + alias = "us_east_1" + region = "us-east-1" +} + +# IAM module +module "iam" { + source = "../../../open-webui/terraform/main-infrastructure/modules/iam" + + project_name = var.project_name +} + +# Compute module +module "compute" { + source = "../../../open-webui/terraform/main-infrastructure/modules/compute" + + project_name = var.project_name + vpc_id = var.vpc_id + vpc_cidr = var.vpc_cidr + public_subnet_id = var.public_subnet_id + ami_id = var.ami_id + instance_type = var.instance_type + key_name = var.key_name + iam_instance_profile = module.iam.ec2_instance_profile_name + security_group_ids = var.security_group_ids + env_file_path = var.env_file_path + setup_script_path = var.setup_script_path + + depends_on = [ + module.iam + ] +} + +# Networking module +module "networking" { + source = "../../../open-webui/terraform/main-infrastructure/modules/networking" + + project_name = var.project_name + aws_region = var.aws_region + vpc_id = var.vpc_id + vpc_cidr = var.vpc_cidr + public_subnet_id = var.public_subnet_id + public_subnet_2_id = var.public_subnet_2_id + security_group_ids = var.security_group_ids + domain = var.domain + subdomain = var.subdomain + domain_internal = var.domain_internal + route53_zone_id = var.route53_internal_zone_id + instance_id = module.compute.instance_id + instance_private_ip = module.compute.instance_private_ip + instance_private_dns = module.compute.instance_private_dns + instance_public_ip = module.compute.instance_public_ip + + providers = { + aws = aws + aws.us_east_1 = aws.us_east_1 + } + + depends_on = [ + module.compute + ] +} diff --git a/spellbook/librechat/terraform/main-infrastructure/outputs.tf b/spellbook/librechat/terraform/main-infrastructure/outputs.tf new file mode 100644 index 00000000..75acfd5c --- /dev/null +++ b/spellbook/librechat/terraform/main-infrastructure/outputs.tf @@ -0,0 +1,34 @@ +output "instance_id" { + description = "ID of the EC2 instance" + value = module.compute.instance_id +} + +output "instance_public_ip" { + description = "Public IP address of the EC2 instance" + value = module.compute.instance_public_ip +} + +output "instance_private_ip" { + description = "Private IP address of the EC2 instance" + value = module.compute.instance_private_ip +} + +output "instance_public_dns" { + description = "Public DNS name of the EC2 instance" + value = module.compute.instance_public_dns +} + +output "vpc_id" { + description = "ID of the VPC" + value = module.networking.vpc_id +} + +output "public_subnet_id" { + description = "ID of the public subnet" + value = module.networking.public_subnet_id +} + +output "security_group_id" { + description = "ID of the security group" + value = module.networking.ec2_security_group_id +} diff --git a/spellbook/librechat/terraform/main-infrastructure/scripts/setup_script.sh b/spellbook/librechat/terraform/main-infrastructure/scripts/setup_script.sh new file mode 100644 index 00000000..6e94ea0d --- /dev/null +++ b/spellbook/librechat/terraform/main-infrastructure/scripts/setup_script.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# ベースのセットアップスクリプトをダウンロードして実行 +curl -fsSL https://raw.githubusercontent.com/Sunwood-ai-labs/AMATERASU/refs/heads/main/scripts/docker-compose_setup_script.sh -o /tmp/base_setup.sh +chmod +x /tmp/base_setup.sh +/tmp/base_setup.sh + +# AMATERASUリポジトリのクローン +git clone https://github.com/Sunwood-ai-labs/AMATERASU.git /home/ubuntu/AMATERASU + +# Terraformから提供される環境変数ファイルの作成 +# 注: .envファイルの内容はTerraformから提供される +echo "${env_content}" > /home/ubuntu/AMATERASU/spellbook/litellm/.env + +# ファイルの権限設定 +chmod 777 -R /home/ubuntu/AMATERASU + +# AMATERASUディレクトリに移動 +cd /home/ubuntu/AMATERASU/spellbook/litellm + +# 指定されたdocker-composeファイルでコンテナを起動 +sudo docker-compose up -d + +echo "AMATERASUのセットアップが完了し、docker-composeを起動しました!" + +# 一時ファイルの削除 +rm /tmp/base_setup.sh diff --git a/spellbook/librechat/terraform/main-infrastructure/versions.tf b/spellbook/librechat/terraform/main-infrastructure/versions.tf new file mode 100644 index 00000000..cfedb036 --- /dev/null +++ b/spellbook/librechat/terraform/main-infrastructure/versions.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">= 0.12" + + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} diff --git a/spellbook/litellm/config.yaml b/spellbook/litellm/config.yaml index 4fbeee1a..eb72b0ed 100644 --- a/spellbook/litellm/config.yaml +++ b/spellbook/litellm/config.yaml @@ -35,6 +35,14 @@ model_list: model: bedrock/amazon.nova-pro-v1:0 aws_region_name: us-east-1 + # ---------------------------------------------- + # ===== Amazon Bedrock DeepSeek Models ===== + # ---------------------------------------------- + - model_name: bedrock/deepseek-r1 + litellm_params: + model: bedrock/us.deepseek.r1-v1:0 + aws_region_name: us-east-1 + # ---------------------------------------------- # ===== Amazon Bedrock Embedding Models ===== # ---------------------------------------------- @@ -154,120 +162,7 @@ model_list: # ---------------------------------------------- # ===== Gemini Models ===== # ---------------------------------------------- - - model_name: gemini/gemini-1.0-pro-latest - litellm_params: - model: gemini/gemini-1.0-pro-latest - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.0-pro - litellm_params: - model: gemini/gemini-1.0-pro - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-pro - litellm_params: - model: gemini/gemini-pro - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.0-pro-001 - litellm_params: - model: gemini/gemini-1.0-pro-001 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.0-pro-vision-latest - litellm_params: - model: gemini/gemini-1.0-pro-vision-latest - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-pro-vision - litellm_params: - model: gemini/gemini-pro-vision - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-pro-latest - litellm_params: - model: gemini/gemini-1.5-pro-latest - api_key: "os.environ/GEMINI_API_KEY" - - model_name: gemini/gemini-1.5-pro-001 - litellm_params: - model: gemini/gemini-1.5-pro-001 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-pro-002 - litellm_params: - model: gemini/gemini-1.5-pro-002 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-pro - litellm_params: - model: gemini/gemini-1.5-pro - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-pro-exp-0801 - litellm_params: - model: gemini/gemini-1.5-pro-exp-0801 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-pro-exp-0827 - litellm_params: - model: gemini/gemini-1.5-pro-exp-0827 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-latest - litellm_params: - model: gemini/gemini-1.5-flash-latest - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-001 - litellm_params: - model: gemini/gemini-1.5-flash-001 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-001-tuning - litellm_params: - model: gemini/gemini-1.5-flash-001-tuning - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash - litellm_params: - model: gemini/gemini-1.5-flash - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-exp-0827 - litellm_params: - model: gemini/gemini-1.5-flash-exp-0827 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-002 - litellm_params: - model: gemini/gemini-1.5-flash-002 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-8b - litellm_params: - model: gemini/gemini-1.5-flash-8b - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-8b-001 - litellm_params: - model: gemini/gemini-1.5-flash-8b-001 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-8b-latest - litellm_params: - model: gemini/gemini-1.5-flash-8b-latest - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-8b-exp-0827 - litellm_params: - model: gemini/gemini-1.5-flash-8b-exp-0827 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-1.5-flash-8b-exp-0924 - litellm_params: - model: gemini/gemini-1.5-flash-8b-exp-0924 - api_key: "os.environ/GEMINI_API_KEY" - model_name: gemini/gemini-2.0-flash-exp litellm_params: @@ -289,25 +184,6 @@ model_list: model: gemini/gemini-2.0-flash-thinking-exp-1219 api_key: "os.environ/GEMINI_API_KEY" - - model_name: gemini/gemini-exp-1206 - litellm_params: - model: gemini/gemini-exp-1206 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-exp-1121 - litellm_params: - model: gemini/gemini-exp-1121 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/gemini-exp-1114 - litellm_params: - model: gemini/gemini-exp-1114 - api_key: "os.environ/GEMINI_API_KEY" - - - model_name: gemini/learnlm-1.5-pro-experimental - litellm_params: - model: gemini/learnlm-1.5-pro-experimental - api_key: "os.environ/GEMINI_API_KEY" # ---------------------------------------------- # ===== Deepseek AI Models =====