You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have configured Google Cloud successfully however, when I ran the bigquery Python example from the Cookbook with my first text question, I get the following error:
2024-04-30 14:17:52 - 'dict' object has no attribute 'to_openai'
Traceback (most recent call last):
File "C:\Users\johnl\PycharmProjects\bigquery\vnew\Lib\site-packages\chainlit\utils.py", line 39, in wrapper
return await user_function(**params_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 139, in main
await chain(message.content)
File "C:\Users\johnl\PycharmProjects\bigquery\vnew\Lib\site-packages\chainlit\step.py", line 84, in async_wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 131, in chain
sql_query = await gen_query(human_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\vnew\Lib\site-packages\chainlit\step.py", line 84, in async_wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 57, in gen_query
messages=[m.to_openai() for m in current_step.generation.messages],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 57, in
messages=[m.to_openai() for m in current_step.generation.messages],
^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'to_openai'
From this code snippet:
# Call OpenAI and stream the message
stream_resp = await openai_client.chat.completions.create(
messages=[m.to_openai() for m in current_step.generation.messages],
stream=True,
**settings
)
Any help would be appreciated - I like this example very much! Please advise & thanks.
The text was updated successfully, but these errors were encountered:
I have configured Google Cloud successfully however, when I ran the bigquery Python example from the Cookbook with my first text question, I get the following error:
2024-04-30 14:17:52 - 'dict' object has no attribute 'to_openai'
Traceback (most recent call last):
File "C:\Users\johnl\PycharmProjects\bigquery\vnew\Lib\site-packages\chainlit\utils.py", line 39, in wrapper
return await user_function(**params_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 139, in main
await chain(message.content)
File "C:\Users\johnl\PycharmProjects\bigquery\vnew\Lib\site-packages\chainlit\step.py", line 84, in async_wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 131, in chain
sql_query = await gen_query(human_query)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\vnew\Lib\site-packages\chainlit\step.py", line 84, in async_wrapper
result = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 57, in gen_query
messages=[m.to_openai() for m in current_step.generation.messages],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\johnl\PycharmProjects\bigquery\app.py", line 57, in
messages=[m.to_openai() for m in current_step.generation.messages],
^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'to_openai'
From this code snippet:
Any help would be appreciated - I like this example very much! Please advise & thanks.
The text was updated successfully, but these errors were encountered: