I would like to use some code to create ASSISTANTS like this:
assistant = client.beta.assistants.create(
name="Data visualizer",
description="You are great at creating beautiful data visualizations. You analyze data present in .csv files, understand trends, and come up with data visualizations relevant to those trends. You also share a brief text summary of the trends observed.",
model="gpt-4-1106-preview",
tools=[{"type": "code_interpreter"}],
file_ids=[file.id]
)
And after creating it, is it possible to see or test it in the ASSISTANT PLAYGROUND?
2024-02-17 22:18:10,441 - logs.AppLogger - INFO - Application start
2024-02-17 22:19:01,456 - logs.AppLogger - INFO - Application start
2024-02-17 22:19:02,463 - logs.AppLogger - INFO - Assistant(id=‘asst_ot3aMFemjyH7u7gnLOAzAMh2’, created_at=1708188541, description=None, file_ids=, instructions=‘You are a personal math tutor. When asked a question, write and run Python code to answer the question.’, metadata={}, model=‘gpt-3.5-turbo-0125’, name=‘Assistant from code’, object=‘assistant’, tools=[ToolCodeInterpreter(type=‘code_interpreter’)])
2024-02-17 22:20:27,875 - logs.AppLogger - INFO - Application start
2024-02-17 22:20:28,817 - logs.AppLogger - INFO - Assistant(id=‘asst_YWeeFrbqZ8bUVWTDOjAM9RGK’, created_at=1708188627, description=None, file_ids=, instructions=‘You are a personal math tutor. When asked a question, write and run Python code to answer the question.’, metadata={}, model=‘gpt-3.5-turbo-16k’, name=‘Assistant from code gpt-3.5-turbo-16k’, object=‘assistant’, tools=[ToolCodeInterpreter(type=‘code_interpreter’)])
Too bad this thread received no responses from the OP or the additional poster to know if it was resolved and how.
In any case I too have got this issue, looking for resolution.
Note - I am a part of an organization, using my API key and the organization key in the headers of the requests.
If I create an Assistant using the platform webUI, trying to access this assistant by running a thread with its asst_id I get:
No assistant found with id: asst_id....
It is also not available in the assistants list when calling GET https://api.openai.com/v1/assistants
If I create an Assistant using the API POST https://api.openai.com/v1/assistants it is available when getting the assistants list, and works with thread run, but does not appear in the platform webUI.
When in the web UI are you 100% sure that the assistant you create is created in the same PROJRCT as your key. You probably have a ‘default project’ which is what was ‘no project’ before the api keys were all specifically part of project. So I think you might have to switch in the UI (top left) to the project your api key is in and then create the assistant?
TL;DR - when I created an assistant in the UI, it was in the Default Project, and the key was assigned to a new project I was not aware of, hence the difference between the UI and API.
This is my first time using the API, and my admin just told me he created an API key for me, and he didn’t mention he created a specific project for this key, so I was not aware that keys in the organization have access to specific projects and not the entire org, while the UI user can access all projects and watch all related data…
Learning something new every day
@ntg69 thanks for the reply, I did create a thread and ran it against an assistant, the problem was that the API key was assigned to a different project than the one I created the assistant on.