I am running the copilot sample from PYPI. I literally copied and pasted the sample, ran it, and I got this error:
File "/Users/jimbobbennett/github/python-demo/app.py", line 9, in <module>
for response in pieces_client.copilot.stream_question(question):
File "/Users/jimbobbennett/github/python-demo/.venv/lib/python3.10/site-packages/pieces_os_client/wrapper/copilot.py", line 78, in _return_on_message
self.chat = BasicChat(message.conversation) # Save the conversation
File "/Users/jimbobbennett/github/python-demo/.venv/lib/python3.10/site-packages/pieces_os_client/wrapper/copilot.py", line 142, in chat
self._chat_id = chat.id if chat else None
File "/Users/jimbobbennett/github/python-demo/.venv/lib/python3.10/site-packages/pieces_os_client/wrapper/basic_identifier/chat.py", line 26, in id
return self.conversation.id
File "/Users/jimbobbennett/github/python-demo/.venv/lib/python3.10/site-packages/pieces_os_client/wrapper/basic_identifier/chat.py", line 15, in conversation
raise ValueError("Conversation not found")
ValueError: Conversation not found
from pieces_os_client.wrapper import PiecesClient
pieces_client = PiecesClient()
# Set the question you want to ask
question = "What is Object-Oriented Programming?"
# Ask the question and stream the response
for response in pieces_client.copilot.stream_question(question):
if response.question:
# Each answer is a chunk of the entire response to the question
answers = response.question.answers.iterable
for answer in answers:
print(answer.text,end="")
# Close the client
pieces_client.close()
Steps to Reproduce
Create a new Python venv and install pieces OS client
Create a new Python file and add the code from the sample
Run the code. You get an answer, then this exception is thrown.
Bug Description
I am running the copilot sample from PYPI. I literally copied and pasted the sample, ran it, and I got this error:
Code sample is from https://pypi.org/project/pieces_os_client/:
Steps to Reproduce
Your operating system
MacOS
Your python version (
python -V
)Python 3.10.x
Your Pieces OS Version
10.1.6
Additional Info
No response