Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions llm_consortium/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ async def _get_model_response(self, model: str, prompt: str) -> Dict[str, Any]:
<instruction>{prompt}</instruction>
</prompt>"""
response = llm.get_model(model).prompt(xml_prompt, system=self.system_prompt)

# Await the text from the response.
text = await response.text()
text = response.text()
asyncio.create_task(log_response(response, model))

return {
Expand Down Expand Up @@ -336,16 +334,16 @@ async def _synthesize_responses(self, original_prompt: str, responses: List[Dict

# Print raw arbiter response
click.echo("\nArbiter Response:\n")
click.echo(await arbiter_response.text())
click.echo(arbiter_response.text())
click.echo("\n---\n")


try:
return self._parse_arbiter_response(await arbiter_response.text())
return self._parse_arbiter_response(arbiter_response.text())
except Exception as e:
logger.error(f"Error parsing arbiter response: {e}")
return {
"synthesis": await arbiter_response.text(),
"synthesis": arbiter_response.text(),
"confidence": 0.5,
"analysis": "Parsing failed - see raw response",
"dissent": "",
Expand Down