Skip to content

Blog: AI package, ChatView, speech, and ML Kit cn1libs#5082

Closed
shai-almog wants to merge 1 commit into
masterfrom
blog-ai-llm-chat-and-mlkit
Closed

Blog: AI package, ChatView, speech, and ML Kit cn1libs#5082
shai-almog wants to merge 1 commit into
masterfrom
blog-ai-llm-chat-and-mlkit

Conversation

@shai-almog
Copy link
Copy Markdown
Collaborator

Summary

  • June 5 follow-up post covering the AI/LLM surface that shipped across PRs Add com.codename1.ai package, ChatView, Speech/TTS, and build-time AI dependency injection #5035 (the package, ChatView, SpeechRecognizer / TextToSpeech, SecureStorage non-prompting overloads, the build-time AiDependencyTable, the simulator Ollama redirect) and Document AI/LLM, ChatView, speech, and ML Kit cn1libs from PR #5035 #5057 (the developer-guide chapter, the bundled agent-skill reference, the LanguageTool word list updates).
  • Walks through LlmClient.openai/anthropic/gemini/ollama, streaming SSE chat, the rest of the value-type taxonomy (tool calls, embeddings, image generation), the ChatView component, the speech APIs, the build-time dependency injection (with the cn1.ai.requiresBigUpload guard for native blobs over 2 GB), and the ML Kit cn1libs.
  • Calls out the Initializr agent skill update so newly generated projects' AGENTS.md covers the new APIs.

File

  • docs/website/content/blog/ai-llm-chat-and-mlkit.md — single new file.

Sequencing

Branches off master; intended to publish after the router post (#5080). Front matter date is 2026-06-05.

Test plan

  • Hugo build of docs/website succeeds.
  • Post renders correctly on the blog index and as a standalone page.
  • Header image is generated at /static/blog/ai-llm-chat-and-mlkit.jpg.

Covers PRs #5035 and #5057:
- com.codename1.ai with LlmClient factories for OpenAI, Anthropic,
  Gemini, Ollama, and a generic OpenAI-compatible endpoint.
- Streaming chat over SSE, tool calls, embeddings, image generation,
  prompt templates, tokenizer, retry policy, conversation store.
- ChatView, ChatBubble, ChatInput, and bindToLlm convenience.
- SpeechRecognizer and TextToSpeech in core, with simulator
  best-effort TTS via say / espeak / SAPI.
- SecureStorage non-prompting overloads for LLM API keys.
- Simulator Ollama detection + SimulatorRedirect for offline
  iteration against localhost:11434.
- AiDependencyTable for build-time injection of iOS pods, SPM
  packages, Android Gradle deps, plist usage strings, and Android
  permissions, with a big-upload guard for >2 GB native blobs.
- The cn1-ai-mlkit-{barcode,docscan,face} cn1libs.
- Initializr agent skill addition so AGENTS.md-aware agents know
  the new APIs in newly generated projects.
@github-actions
Copy link
Copy Markdown
Contributor

Cloudflare Preview

@shai-almog
Copy link
Copy Markdown
Collaborator Author

Superseded — consolidating the follow-up posts so this release week ships fewer, broader posts. New merged versions in the follow-up PRs to this one.

@shai-almog shai-almog closed this May 29, 2026
@shai-almog shai-almog deleted the blog-ai-llm-chat-and-mlkit branch May 29, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant