Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug with Miner recieving messages in list of strings instead of list of dicts #1293

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

ViktorThink
Copy link
Contributor

@ViktorThink ViktorThink commented Apr 21, 2023

This PR fixes #1292

On the previous version of bittensor/_synapse/text_prompting/synapse.py (https://github.com/opentensor/bittensor/blob/eff272409704d801ce337a2ce850ba49368848d5/bittensor/_synapse/text_prompting/synapse.py)
On line 57 it is:

formatted_messages = [ json.loads(message) for message in forward_call.messages ]

The most recent update to the file made yesterday, had the json.loads function removed, causing the error:

self.formatted_messages = [ message for message in self.messages ]

So I simply added import of json and json loading the messages.

I will test the solution today to make doubly sure it solves the issue.

@ViktorThink
Copy link
Contributor Author

I have tested now and it works correctly:

messages: [{'role': 'system', 'content': '\nYou are designed to assist with a wide range of tasks, from answering simple questions to providing in-depth explanations and discussions on a wide range of topics.\n'}, {'role': 'user', 'content': '\nAsk me a random question about anything. Make the question very domain specific. Do not include the answer in the question.\n'}]

@ViktorThink ViktorThink marked this pull request as ready for review April 21, 2023 14:25
@joeylegere joeylegere merged commit 21594a8 into opentensor:text_prompting Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants