feat: golem15.golem plugin with the OpenAI-compatible adapter and AIService.Send

- Prompt, Payload and AIResponse value objects ported from Golem15.Golem
- OpenAIAdapter: chat completions mapping with PHP's response_format,
  max_completion_tokens and reasoning_effort rules
- AIService.Send through fetchguard (TrustedMode for operator models,
  PublicOnlyMode otherwise) with PHP's failure messages
- config defaults for the SSRF allowlist and the AI timeout, lang, README
This commit is contained in:
Jakub Zych
2026-10-03 22:41:49 +02:00
commit cd3f0f6c1c
14 changed files with 1451 additions and 0 deletions

10
config/config.yaml Normal file
View File

@@ -0,0 +1,10 @@
ssrf:
# Hosts an untrusted AI base URL (and an AI-returned image URL) may use.
# A leading dot matches any subdomain. GOLEM15_SSRF_ALLOWED_HOSTS
# (a comma list) replaces the list when it is set and not empty.
allowed_hosts:
- oaidalleapiprodscus.blob.core.windows.net
- .openai.com
ai:
# Request timeout of every AI provider call, in seconds.
timeout_seconds: 120