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
With the constructor of AssistantCreationOptions / FileSearchToolRessources it's not possible to ever set a value for VectorStoreIds.
Since the field is left uninitialized it's not possible to use the Add method and also a new List cannot be assigned since the set-method is declared as internal.
Steps to reproduce
See here:
AssistantCreationOptions options = new AssistantCreationOptions()
{
Name = "Test",
Instructions = "Some instructions...",
Tools = { ToolDefinition.CreateFileSearch(10) }
};
options.ToolResources.FileSearch.VectorStoreIds.Add(myVectorStore.Id);
This compiles but throws an exception because "Add" requires a non-null Object on VectorStoreIds (which is missing in the constructor).
This would also be expected to be possible:
AssistantCreationOptions options = new AssistantCreationOptions()
{
Name = "Test",
Instructions = "Some instructions...",
Tools = { ToolDefinition.CreateFileSearch(10) },
ToolResources = new FileSearchToolResources() {
VectorStoreIds = [myVectorStoreId],
}
};
This example doesn't compile because VectorStoreIds is read only because of being "inline".
Code snippets
No response
OS
Windows 11
.NET version
8.0
Library version
2.1.0
The text was updated successfully, but these errors were encountered:
cpalm1974
changed the title
VectorStoreIds in AssistantCreationOptions cannot be populated
VectorStoreIds in AssistantCreationOptions / FileSearchToolResources cannot be populated
Dec 3, 2024
Service
OpenAI
Describe the bug
With the constructor of AssistantCreationOptions / FileSearchToolRessources it's not possible to ever set a value for VectorStoreIds.
Since the field is left uninitialized it's not possible to use the Add method and also a new List cannot be assigned since the set-method is declared as internal.
Steps to reproduce
This compiles but throws an exception because "Add" requires a non-null Object on VectorStoreIds (which is missing in the constructor).
This example doesn't compile because VectorStoreIds is read only because of being "inline".
Code snippets
No response
OS
Windows 11
.NET version
8.0
Library version
2.1.0
The text was updated successfully, but these errors were encountered: