mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-05-12 16:52:37 +02:00
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:
parent
03cc5ac80f
commit
d282d72db1
7 changed files with 22 additions and 19 deletions
|
|
@ -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 | {
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue