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

Unable to retrieve generated files from Assistants API since gpt-4o #1427

Open
1 task done
melvinmt opened this issue May 15, 2024 · 0 comments
Open
1 task done

Unable to retrieve generated files from Assistants API since gpt-4o #1427

melvinmt opened this issue May 15, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@melvinmt
Copy link

Confirm this is an issue with the Python library and not an underlying OpenAI API

  • This is an issue with the Python library

Describe the bug

This used to work before the gpt-4o launch, but now we are not seeing any file attachments for generated files with Code Interpreter.

To Reproduce

Prompt:

Generate a CSV with all 50 US states.

Model:

gpt-3.5-turbo | gpt-4-turbo | gpt-4o

Code snippets

Logs:


import pandas as pd
# List of all US states
states = [
"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado",
"Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho",
"Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana",
"Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota",
"Mississippi", "Missouri", "Montana", "Nebraska", "Nevada",
"New Hampshire", "New Jersey", "New Mexico", "New York",
"North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon",
"Pennsylvania", "Rhode Island", "South Carolina",
"South Dakota", "Tennessee", "Texas", "Utah", "Vermont",
"Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"
]
# Create a DataFrame
df_states = pd.DataFrame(states, columns=['State'])
# Save DataFrame to CSV
csv_path = "/mnt/data/US_States.csv"
df_states.to_csv(csv_path, index=False)
The CSV file containing all 50 US states has been created. You can download it using the link below:

Retrieve all messages from openai.beta.threads.messages.list

SyncCursorPage[Message](
    data=[
        Message(
            id='msg_s9WPnzqF8xxxxxxxxxxxxx',
            assistant_id='asst_ndcMgmxxxxxxxxxxxxx',
            attachments=[],
            completed_at=None,
            content=[
                TextContentBlock(
                    text=Text(
                        annotations=[],
                        value='The CSV file containing all 50 US states has been created. You can download it using the link below:\n\n[Download US States
CSV](sandbox:/mnt/data/US_States.csv)'
                    ),
                    type='text'
                )
            ],
            created_at=1715719138,
            incomplete_at=None,
            incomplete_details=None,
            metadata={},
            object='thread.message',
            role='assistant',
            run_id='run_YnT0xxxxxxxxxxxxx',
            status=None,
            thread_id='thread_ntw4xxxxxxxxxxxxx'
        ),
        Message(
            id='msg_aAgUWCpxxxxxxxxxxxxx',
            assistant_id=None,
            attachments=[],
            completed_at=None,
            content=[TextContentBlock(text=Text(annotations=[], value='Generate a CSV with all 50 US states.'), type='text')],
            created_at=1715719114,
            incomplete_at=None,
            incomplete_details=None,
            metadata={},
            object='thread.message',
            role='user',
            run_id=None,
            status=None,
            thread_id='thread_ntw4aiXxxxxxxxxxxxxx'
        )
    ],
    object='list',
    first_id='msg_s9WPnzqF8Qaxxxxxxxxxxxxx',
    last_id='msg_aAgUWCppWBxxxxxxxxxxxxx',
    has_more=False
)


### OS

macOS

### Python version

Python v3.11.9

### Library version

openai v1.3.0.1
@melvinmt melvinmt added the bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants