Fixed document-rag workspace problem (#866)

- 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:
cybermaggedon 2026-05-06 14:55:21 +01:00 committed by GitHub
parent 03cc5ac80f
commit d282d72db1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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: