diff --git a/concordia/language_model/ollama_model.py b/concordia/language_model/ollama_model.py index 7fa439b2..d29d05dc 100644 --- a/concordia/language_model/ollama_model.py +++ b/concordia/language_model/ollama_model.py @@ -91,7 +91,7 @@ def sample_text( options={'stop': terminators}, keep_alive='10m', ) - result = response.response + result = response['response'] if self._measurements is not None: self._measurements.publish_datum( @@ -127,7 +127,7 @@ def sample_choice( keep_alive='10m', ) try: - json_data_response = json.loads(response.response) + json_data_response = json.loads(response['response']) except json.JSONDecodeError: continue sample_or_none = json_data_response.get('choice', None)