- Fixed document-rag workspace problem

- OpenAI text-completion processor now puts 'not-set' in the token
  if no token is set (new OpenAI library requires it to be set to
  something.
- Update tests
This commit is contained in:
Cyber MacGeddon 2026-05-06 14:44:56 +01:00
parent 03cc5ac80f
commit 3d40d72ce3
7 changed files with 22 additions and 19 deletions

View file

@ -35,8 +35,8 @@ class Processor(LlmService):
temperature = params.get("temperature", default_temperature)
max_output = params.get("max_output", default_max_output)
if api_key is None:
raise RuntimeError("OpenAI API key not specified")
if not api_key:
api_key = "not-set"
super(Processor, self).__init__(
**params | {

View file

@ -122,7 +122,7 @@ class Query:
for match in chunk_matches:
if match.chunk_id:
try:
content = await self.rag.fetch_chunk(match.chunk_id, self.workspace)
content = await self.rag.fetch_chunk(match.chunk_id)
docs.append(content)
chunk_ids.append(match.chunk_id)
except Exception as e: