feat(keyboard): ship AI mode surface with streaming search answers
Add the AI keyboard tab, Agent settings, and user-owned LLM key path for 1.7.0, including streaming answers and web-search transports without the built-in DeepSeek fallback.
This commit is contained in:
@@ -21,20 +21,6 @@ if [[ ! -f "$SIGNING_LOCAL" ]]; then
|
||||
echo "Edit DEVELOPMENT_TEAM there if you use a personal Apple Developer account."
|
||||
fi
|
||||
|
||||
# Local-engine DeepSeek key (gitignored). XcodeGen compiles this file;
|
||||
# the example ships a placeholder so fresh clones build after copy.
|
||||
PRECONFIG_LOCAL="$ROOT/OSGKeyboardShared/Services/PreconfiguredKeys.local.swift"
|
||||
PRECONFIG_EXAMPLE="$ROOT/OSGKeyboardShared/Services/PreconfiguredKeys.local.swift.example"
|
||||
if [[ ! -f "$PRECONFIG_LOCAL" ]]; then
|
||||
if [[ ! -f "$PRECONFIG_EXAMPLE" ]]; then
|
||||
echo "error: missing $PRECONFIG_EXAMPLE" >&2
|
||||
exit 1
|
||||
fi
|
||||
cp "$PRECONFIG_EXAMPLE" "$PRECONFIG_LOCAL"
|
||||
echo "Created $PRECONFIG_LOCAL from PreconfiguredKeys.local.swift.example"
|
||||
echo "Edit deepseek in that file before using the local engine's built-in polish."
|
||||
fi
|
||||
|
||||
"$ROOT/Scripts/ensure-mlx-audio-swift.sh"
|
||||
|
||||
xcodegen generate
|
||||
|
||||
@@ -16,7 +16,9 @@ Usage:
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
import urllib.request
|
||||
from collections import Counter, defaultdict
|
||||
@@ -26,7 +28,6 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
SHARED = ROOT / "OSGKeyboardShared"
|
||||
STYLE_DIR = SHARED / "Resources" / "PolishStyles"
|
||||
COMPOSER = SHARED / "Services" / "PolishPromptComposer.swift"
|
||||
KEYFILE = SHARED / "Services" / "PreconfiguredKeys.local.swift"
|
||||
|
||||
ENDPOINT = "https://api.deepseek.com/chat/completions"
|
||||
MODEL = "deepseek-v4-flash"
|
||||
@@ -351,7 +352,10 @@ def main() -> None:
|
||||
parser.add_argument("--output", default=".tmp/polish-question-stress.json")
|
||||
args = parser.parse_args()
|
||||
|
||||
api_key = re.search(r'deepseek = "([^"]+)"', KEYFILE.read_text()).group(1)
|
||||
api_key = os.environ.get("DEEPSEEK_API_KEY", "").strip()
|
||||
if not api_key:
|
||||
print("Set DEEPSEEK_API_KEY to run this live eval.", file=sys.stderr)
|
||||
raise SystemExit(2)
|
||||
styles = STYLES if args.styles == "all" else [
|
||||
item.strip() for item in args.styles.split(",") if item.strip()
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user