(t *testing.T)
| 62 | } |
| 63 | |
| 64 | func TestVectorStoreFileBatchGet(t *testing.T) { |
| 65 | baseURL := "http://localhost:4010" |
| 66 | if envURL, ok := os.LookupEnv("TEST_API_BASE_URL"); ok { |
| 67 | baseURL = envURL |
| 68 | } |
| 69 | if !testutil.CheckTestServer(t, baseURL) { |
| 70 | return |
| 71 | } |
| 72 | client := openai.NewClient( |
| 73 | option.WithBaseURL(baseURL), |
| 74 | option.WithAPIKey("My API Key"), |
| 75 | option.WithAdminAPIKey("My Admin API Key"), |
| 76 | ) |
| 77 | _, err := client.VectorStores.FileBatches.Get( |
| 78 | context.TODO(), |
| 79 | "vs_abc123", |
| 80 | "vsfb_abc123", |
| 81 | ) |
| 82 | if err != nil { |
| 83 | var apierr *openai.Error |
| 84 | if errors.As(err, &apierr) { |
| 85 | t.Log(string(apierr.DumpRequest(true))) |
| 86 | } |
| 87 | t.Fatalf("err should be nil: %s", err.Error()) |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func TestVectorStoreFileBatchCancel(t *testing.T) { |
| 92 | baseURL := "http://localhost:4010" |
nothing calls this directly
no test coverage detected
searching dependent graphs…