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

VectorStoreIds in AssistantCreationOptions / FileSearchToolResources cannot be populated #301

Open
cpalm1974 opened this issue Dec 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@cpalm1974
Copy link

cpalm1974 commented 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

  1. 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).

  1. 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

@cpalm1974 cpalm1974 added the bug Something isn't working label Dec 3, 2024
@cpalm1974 cpalm1974 changed the title VectorStoreIds in AssistantCreationOptions cannot be populated VectorStoreIds in AssistantCreationOptions / FileSearchToolResources cannot be populated Dec 3, 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

1 participant