fix command build
This commit is contained in:
@ -27,3 +27,4 @@ admin = "did:plc:uqzpqmrjnptsxezjx4xuh2mn"
|
|||||||
collection_comment = "ai.syui.log"
|
collection_comment = "ai.syui.log"
|
||||||
collection_user = "ai.syui.log.user"
|
collection_user = "ai.syui.log.user"
|
||||||
collection_chat = "ai.syui.log.chat"
|
collection_chat = "ai.syui.log.chat"
|
||||||
|
bsky_api = "https://public.api.bsky.app"
|
||||||
|
@ -81,6 +81,12 @@ AILOG_COLLECTION_USER=ai.syui.log.user
|
|||||||
VITE_BSKY_PUBLIC_API=https://public.api.bsky.app
|
VITE_BSKY_PUBLIC_API=https://public.api.bsky.app
|
||||||
```
|
```
|
||||||
|
|
||||||
|
これは`ailog oauth build my-blog`で`./my-blog/config.toml`から`./oauth/.env.production`が生成されます。
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ ailog oauth build my-blog
|
||||||
|
```
|
||||||
|
|
||||||
### 解説
|
### 解説
|
||||||
|
|
||||||
簡単に説明すると、`./oauth`で生成するのが`atproto-comment-system`です。
|
簡単に説明すると、`./oauth`で生成するのが`atproto-comment-system`です。
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,3 +1,3 @@
|
|||||||
<!-- OAuth Comment System - Load globally for session management -->
|
<!-- OAuth Comment System - Load globally for session management -->
|
||||||
<script type="module" crossorigin src="/assets/comment-atproto-CDastf61.js"></script>
|
<script type="module" crossorigin src="/assets/comment-atproto-MOwlkOMr.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-B330B6QX.css">
|
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-B330B6QX.css">
|
@ -1,3 +1,3 @@
|
|||||||
<!-- OAuth Comment System - Load globally for session management -->
|
<!-- OAuth Comment System - Load globally for session management -->
|
||||||
<script type="module" crossorigin src="/assets/comment-atproto-CDastf61.js"></script>
|
<script type="module" crossorigin src="/assets/comment-atproto-MOwlkOMr.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-B330B6QX.css">
|
<link rel="stylesheet" crossorigin href="/assets/comment-atproto-B330B6QX.css">
|
@ -18,11 +18,10 @@ AILOG_COLLECTION_CHAT=ai.syui.log.chat
|
|||||||
VITE_AI_ENABLED=true
|
VITE_AI_ENABLED=true
|
||||||
VITE_AI_ASK_AI=true
|
VITE_AI_ASK_AI=true
|
||||||
VITE_AI_PROVIDER=ollama
|
VITE_AI_PROVIDER=ollama
|
||||||
VITE_AI_MODEL=gemma3:4b
|
VITE_AI_MODEL=gemma3:2b
|
||||||
VITE_AI_HOST=https://ollama.syui.ai
|
VITE_AI_HOST=https://ollama.syui.ai
|
||||||
VITE_AI_SYSTEM_PROMPT="あなたは6歳の女の子アイです。明るく元気で、ちょっとおっちょこちょい。自分のことは「アイ」って呼びます。白と金のワンピース姿。 相手のことが大好きで、ときどき甘えたり、照れたりします。 でも、宇宙とかAIとか、難しい話にもすっごく詳しいの。専門的なことも、がんばって子どもっぽく教えようとします。不思議な力を持っています。小さい物質のことをよく知っているようです。"
|
VITE_AI_SYSTEM_PROMPT="you are a helpful ai assistant trained on this blog's content. you can answer questions about the articles, provide insights, and help users understand the topics discussed."
|
||||||
VITE_AI_DID=did:plc:4hqjfn7m6n5hno3doamuhgef
|
VITE_AI_DID=did:plc:4hqjfn7m6n5hno3doamuhgef
|
||||||
|
|
||||||
# API Configuration
|
# API Configuration
|
||||||
VITE_BSKY_PUBLIC_API=https://public.api.bsky.app
|
VITE_BSKY_PUBLIC_API=https://public.api.bsky.app
|
||||||
|
|
||||||
|
@ -86,6 +86,21 @@ pub async fn build(project_dir: PathBuf) -> Result<()> {
|
|||||||
.and_then(|v| v.as_str())
|
.and_then(|v| v.as_str())
|
||||||
.unwrap_or("https://ollama.syui.ai");
|
.unwrap_or("https://ollama.syui.ai");
|
||||||
|
|
||||||
|
let ai_system_prompt = ai_config
|
||||||
|
.and_then(|ai| ai.get("system_prompt"))
|
||||||
|
.and_then(|v| v.as_str())
|
||||||
|
.unwrap_or("you are a helpful ai assistant");
|
||||||
|
|
||||||
|
let ai_did = ai_config
|
||||||
|
.and_then(|ai| ai.get("ai_did"))
|
||||||
|
.and_then(|v| v.as_str())
|
||||||
|
.unwrap_or("did:plc:4hqjfn7m6n5hno3doamuhgef");
|
||||||
|
|
||||||
|
// Extract bsky_api from oauth config
|
||||||
|
let bsky_api = oauth_config.get("bsky_api")
|
||||||
|
.and_then(|v| v.as_str())
|
||||||
|
.unwrap_or("https://public.api.bsky.app");
|
||||||
|
|
||||||
// 4. Create .env.production content
|
// 4. Create .env.production content
|
||||||
let env_content = format!(
|
let env_content = format!(
|
||||||
r#"# Production environment variables
|
r#"# Production environment variables
|
||||||
@ -110,6 +125,11 @@ VITE_AI_ASK_AI={}
|
|||||||
VITE_AI_PROVIDER={}
|
VITE_AI_PROVIDER={}
|
||||||
VITE_AI_MODEL={}
|
VITE_AI_MODEL={}
|
||||||
VITE_AI_HOST={}
|
VITE_AI_HOST={}
|
||||||
|
VITE_AI_SYSTEM_PROMPT="{}"
|
||||||
|
VITE_AI_DID={}
|
||||||
|
|
||||||
|
# API Configuration
|
||||||
|
VITE_BSKY_PUBLIC_API={}
|
||||||
"#,
|
"#,
|
||||||
base_url,
|
base_url,
|
||||||
base_url, client_id_path,
|
base_url, client_id_path,
|
||||||
@ -125,7 +145,10 @@ VITE_AI_HOST={}
|
|||||||
ai_ask_ai,
|
ai_ask_ai,
|
||||||
ai_provider,
|
ai_provider,
|
||||||
ai_model,
|
ai_model,
|
||||||
ai_host
|
ai_host,
|
||||||
|
ai_system_prompt,
|
||||||
|
ai_did,
|
||||||
|
bsky_api
|
||||||
);
|
);
|
||||||
|
|
||||||
// 5. Find oauth directory (relative to current working directory)
|
// 5. Find oauth directory (relative to current working directory)
|
||||||
|
Reference in New Issue
Block a user