honcho: enable OpenAI embeddings for conclusion vectorisation
- Add vault_honcho_openai_api_key (embeddings-only, Honcho-scoped)
- Inject OPENAI_API_KEY + LLM_OPENAI_API_KEY into api + deriver containers
- Flip honcho_embed_messages default to true now that embeddings have a provider
- Parameterise EMBEDDING__MODEL_CONFIG__{TRANSPORT,MODEL,BASE_URL} so we can
later swap to a local OpenAI-compatible embedder (e.g. Ollama on
astro-orbiter post-rebuild) with a single defaults change.
Vault diff is large because ansible-vault re-encrypts the whole file; logical
change is one new key.
This commit is contained in:
@@ -111,7 +111,15 @@ honcho_deriver_flush_enabled: true
|
||||
# 3. Stand up a local BGE/nomic embedding endpoint (e.g. on astro-orbiter
|
||||
# once GPU is ready) and point Honcho at it via
|
||||
# EMBEDDING_MODEL_CONFIG__OVERRIDES__BASE_URL.
|
||||
honcho_embed_messages: false
|
||||
honcho_embed_messages: true
|
||||
|
||||
# Embedding provider (transport must be openai-compatible). The default
|
||||
# OpenAI endpoint requires honcho_openai_api_key. To swap to a local
|
||||
# OpenAI-compatible embedder (e.g. Ollama), set honcho_embedding_base_url
|
||||
# to the upstream /v1 URL and the API key can be any non-empty string.
|
||||
honcho_embedding_transport: "openai"
|
||||
honcho_embedding_model: "text-embedding-3-small"
|
||||
honcho_embedding_base_url: ""
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Auth
|
||||
@@ -126,9 +134,11 @@ honcho_auth_enabled: true
|
||||
# vault_honcho_database_password - postgres role password
|
||||
# vault_honcho_jwt_secret - 32+ byte random string for JWT signing
|
||||
# vault_honcho_anthropic_api_key - Anthropic API key for Claude calls
|
||||
# vault_honcho_openai_api_key - OpenAI API key, embeddings-only
|
||||
honcho_db_password: "{{ vault_honcho_database_password }}"
|
||||
honcho_jwt_secret: "{{ vault_honcho_jwt_secret }}"
|
||||
honcho_anthropic_api_key: "{{ vault_honcho_anthropic_api_key }}"
|
||||
honcho_openai_api_key: "{{ vault_honcho_openai_api_key }}"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Health check
|
||||
|
||||
@@ -28,6 +28,14 @@ Environment=AUTH_JWT_SECRET={{ honcho_jwt_secret }}
|
||||
Environment=LLM_ANTHROPIC_API_KEY={{ honcho_anthropic_api_key }}
|
||||
{% endif %}
|
||||
|
||||
# OpenAI key — used only by the embedding subsystem. Always present so
|
||||
# that conclusion vectorisation and any later semantic-search path works
|
||||
# regardless of which provider serves LLM completions.
|
||||
{% if honcho_openai_api_key | length > 0 %}
|
||||
Environment=LLM_OPENAI_API_KEY={{ honcho_openai_api_key }}
|
||||
Environment=OPENAI_API_KEY={{ honcho_openai_api_key }}
|
||||
{% endif %}
|
||||
|
||||
# -- Deriver subsystem ------------------------------------------------------
|
||||
Environment=DERIVER_FLUSH_ENABLED={{ honcho_deriver_flush_enabled | string | lower }}
|
||||
Environment=DERIVER_MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
||||
@@ -49,8 +57,13 @@ Environment=DIALECTIC_LEVELS__high__MODEL_CONFIG__MODEL={{ honcho_dialectic_mode
|
||||
Environment=DIALECTIC_LEVELS__max__MODEL_CONFIG__TRANSPORT={{ honcho_llm_transport }}
|
||||
Environment=DIALECTIC_LEVELS__max__MODEL_CONFIG__MODEL={{ honcho_dialectic_model }}
|
||||
|
||||
# -- Embeddings (Anthropic has no embed API; off by default) ----------------
|
||||
# -- Embeddings (text-embedding-3-small via OpenAI by default) --------------
|
||||
Environment=EMBED_MESSAGES={{ honcho_embed_messages | string | lower }}
|
||||
Environment=EMBEDDING__MODEL_CONFIG__TRANSPORT={{ honcho_embedding_transport }}
|
||||
Environment=EMBEDDING__MODEL_CONFIG__MODEL={{ honcho_embedding_model }}
|
||||
{% if honcho_embedding_base_url | length > 0 %}
|
||||
Environment=EMBEDDING__MODEL_CONFIG__BASE_URL={{ honcho_embedding_base_url }}
|
||||
{% endif %}
|
||||
|
||||
# -- Vector store -----------------------------------------------------------
|
||||
Environment=VECTOR_STORE_TYPE=pgvector
|
||||
|
||||
@@ -28,7 +28,11 @@ Environment=AUTH_JWT_SECRET={{ honcho_jwt_secret }}
|
||||
|
||||
# -- LLM provider keys ------------------------------------------------------
|
||||
{% if honcho_llm_transport == 'anthropic' %}
|
||||
Environment=LLM_ANTHROPIC_API_KEY={{ honcho_anthropic_api_key }}
|
||||
Environment=LLM_ANTHROPIC_API_KEY=*** honcho_anthropic_api_key }}
|
||||
{% endif %}
|
||||
{% if honcho_openai_api_key | length > 0 %}
|
||||
Environment=LLM_OPENAI_API_KEY=*** honcho_openai_api_key }}
|
||||
Environment=OPENAI_API_KEY=*** honcho_openai_api_key }}
|
||||
{% endif %}
|
||||
|
||||
# -- Deriver runtime --------------------------------------------------------
|
||||
@@ -45,6 +49,11 @@ Environment=SUMMARY_MODEL_CONFIG__MODEL={{ honcho_summary_model }}
|
||||
|
||||
# -- Embeddings -------------------------------------------------------------
|
||||
Environment=EMBED_MESSAGES={{ honcho_embed_messages | string | lower }}
|
||||
Environment=EMBEDDING__MODEL_CONFIG__TRANSPORT={{ honcho_embedding_transport }}
|
||||
Environment=EMBEDDING__MODEL_CONFIG__MODEL={{ honcho_embedding_model }}
|
||||
{% if honcho_embedding_base_url | length > 0 %}
|
||||
Environment=EMBEDDING__MODEL_CONFIG__BASE_URL={{ honcho_embedding_base_url }}
|
||||
{% endif %}
|
||||
|
||||
# -- Vector store -----------------------------------------------------------
|
||||
Environment=VECTOR_STORE_TYPE=pgvector
|
||||
|
||||
Reference in New Issue
Block a user