-
Notifications
You must be signed in to change notification settings - Fork 397
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
Attempt to prevent reprovisioning of existing agents and the reuploading of files #60
Conversation
…ent existing files from being reuploaded, still needs tool integration and a process to deal with modifcation to files that have already been uploaded for retrievial
Looks good, I'll ask the community to validate and test. |
agent_builder/create.py
Outdated
@@ -14,9 +14,26 @@ | |||
if not os.path.exists(agents_path) or not os.path.isdir(agents_path) or not os.listdir(agents_path): | |||
raise ValueError('The "agents" folder is missing, not a directory, or empty.') | |||
|
|||
existing_assitstants = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling mistake - should be '..._assistants'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have fixed the spelling thanks!
agent_builder/create.py
Outdated
file_object = client.files.create(file=file_data, purpose='assistants') | ||
files.append({"name": filename, "id": file_object.id}) | ||
|
||
model = 'gpt-4-1106-preview' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let’s move the model label onto an environment variable or at least a config file as this will change in the future. We may also want to parameterise it to compare our unit/integration tests against previous versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a settings.json file to maintain other properties that can be set during the Assistant creation process.
Note: "description" and "metadata" are not currently connected
"tools" is connected for the creation of new Assistants, but not currently handled when updating existing Assistants.
…ilable during the Assistant creation process for an Agent, updated create.py to use model and tools properties present in the new settings.json file
Attempt to prevent reprovisioning of existing agents and the reuploading of files
Adding logic to prevent the duplication of existing agents, and to prevent existing files from being reuploaded.
The script still needs tool integration for agents.
In order to allow for retrieval file modification either the contents of the files can be compared using https://platform.openai.com/docs/api-reference/files/retrieve-contents , or it could be required that whenever a retrieval file needs to be updated its file name should also be updated.