diff --git a/prompting/llms/apis/sn19_wrapper.py b/prompting/llms/apis/sn19_wrapper.py index d8146985..a227d2ab 100644 --- a/prompting/llms/apis/sn19_wrapper.py +++ b/prompting/llms/apis/sn19_wrapper.py @@ -38,6 +38,7 @@ def chat_complete( } response = requests.post(url, headers=headers, data=json.dumps(data)) try: - return response.json()["choices"][0]["delta"]["content"] + response_json = response.json() + return response_json["choices"][0]["message"].get("content") except Exception as e: logger.exception(f"Error in chat_complete: {e}") diff --git a/pyproject.toml b/pyproject.toml index 27bc94cc..73c7f20e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "prompting" -version = "2.13.0" +version = "2.13.1" description = "Subnetwork 1 runs on Bittensor and is maintained by Macrocosmos. It's an effort to create decentralised AI" authors = ["Kalei Brady, Dmytro Bobrenko, Felix Quinque, Steffen Cruz"] readme = "README.md"