Ana içeriğe atla

Bu tarayıcı artık desteklenmiyor.

En son özelliklerden, güvenlik güncelleştirmelerinden ve teknik destekten faydalanmak için Microsoft Edge’e yükseltin.

Microsoft Edge'i indirin Internet Explorer ve Microsoft Edge hakkında daha fazla bilgi
microsoft-foundry.rest.security.o-auth2-auth

Vector stores

List vector store files

GET /openai/v1/vector_stores/{vector_store_id}/files

Lists vector store files matching the request filters.

Yol parametreleri

vector_store_id string gerekli

The ID of the vector store that the files belong to.

Sorgu parametreleri

limit integer

A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

order enum

Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

ascdesc
after string

A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

before string

A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

filter enum

Filter by file status. One of in_progress, completed, failed, cancelled.

in_progresscompletedfailedcancelled

Yanıtlar

The request has succeeded.

Gövde

Content-Type: application/json
object string gerekli
data OpenAI.VectorStoreFileObject[] gerekli
first_id string gerekli
last_id string gerekli
has_more boolean gerekli

Client error

Gövde

Content-Type: application/json
error OpenAI.Error gerekli
code string | null gerekli
message string gerekli
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Aşağıdakilerden biri:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string gerekli

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

Server error

Gövde

Content-Type: application/json
error OpenAI.Error gerekli
code string | null gerekli
message string gerekli
param string | null
type string
misalignment OpenAI.MisalignmentErrorDetailsResource
review_target string | null
error_type string | enum
Aşağıdakilerden biri:
string
enum
potentially_unintended_data_transferpotentially_unintended_data_accesspotentially_unintended_destructive_activityother
detailed_explanation string

The public explanation for this block.

steer OpenAI._MisalignmentSteer
message string gerekli

The public continuation instruction.

details OpenAI.Error[]
additionalInfo object
debugInfo object

İstek

curl https://api.openai.com/v1/vector_stores/vs_abc123/files \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "OpenAI-Beta: assistants=v2"
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ.get("OPENAI_API_KEY"),  # This is the default and can be omitted
)
page = client.vector_stores.files.list(
    vector_store_id="vector_store_id",
)
page = page.data[0]
print(page.id)
import OpenAI from "openai";
const openai = new OpenAI();

async function main() {
  const vectorStoreFiles = await openai.vectorStores.files.list(
    "vs_abc123"
  );
  console.log(vectorStoreFiles);
}

main();
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env['OPENAI_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const vectorStoreFile of client.vectorStores.files.list('vector_store_id')) {
  console.log(vectorStoreFile.id);
}
package main

import (
    "context"
    "fmt"

    "github.com/openai/openai-go"
    "github.com/openai/openai-go/option"
)

func main() {
    client := openai.NewClient(
        option.WithAPIKey("My API Key"),
    )
    page, err := client.VectorStores.Files.List(
        context.TODO(),
        "vector_store_id",
        openai.VectorStoreFileListParams{},
    )
    if err != nil {
        panic(err.Error())
    }
    fmt.Printf("%+v
", page)
}
package com.openai.example;

import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.vectorstores.files.FileListPage;
import com.openai.models.vectorstores.files.FileListParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        OpenAIClient client = OpenAIOkHttpClient.fromEnv();

        FileListPage page = client.vectorStores().files().list("vector_store_id");
    }
}
require "openai"

openai = OpenAI::Client.new(api_key: "My API Key")

page = openai.vector_stores.files.list("vector_store_id")

puts(page)

Response

{
  "object": "list",
  "data": [
    {
      "id": "file-abc123",
      "object": "vector_store.file",
      "created_at": 1699061776,
      "vector_store_id": "vs_abc123"
    },
    {
      "id": "file-abc456",
      "object": "vector_store.file",
      "created_at": 1699061776,
      "vector_store_id": "vs_abc123"
    }
  ],
  "first_id": "file-abc123",
  "last_id": "file-abc456",
  "has_more": false
}
tr-tr
Gizlilik Tercihleriniz
  • AI Bildirim
  • Önceki Sürümler
  • Blog
  • Katkıda Bulunun
  • Gizlilik
  • Tüketici Sağlığı Gizliliği
  • Kullanım Koşulları
  • Ticari Markalar
  • © Microsoft 2026