(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestVectorStoreFileBatchCancel(t *testing.T) { |
| 92 | baseURL := "http://localhost:4010" |
| 93 | if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { |
| 94 | baseURL = envURL |
| 95 | } |
| 96 | if !testutil.CheckTestServer(t, baseURL) { |
| 97 | return |
| 98 | } |
| 99 | client := openai.NewClient( |
| 100 | option.WithBaseURL(baseURL), |
| 101 | option.WithAPIKey("My API Key"), |
| 102 | option.WithAdminAPIKey("My Admin API Key"), |
| 103 | ) |
| 104 | _, err := client.VectorStores.FileBatches.Cancel( |
| 105 | context.TODO(), |
| 106 | "vector_store_id", |
| 107 | "batch_id", |
| 108 | ) |
| 109 | if err != nil { |
| 110 | var apierr *openai.Error |
| 111 | if errors.As(err, &apierr) { |
| 112 | t.Log(string(apierr.DumpRequest(true))) |
| 113 | } |
| 114 | t.Fatalf("err should be nil: %s", err.Error()) |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | func TestVectorStoreFileBatchListFilesWithOptionalParams(t *testing.T) { |
| 119 | baseURL := "http://localhost:4010" |
nothing calls this directly
no test coverage detected
searching dependent graphs…