openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
specification/client/models/vector-stores.models.tsp
74lines · modecode
| 1 | import "../../base/typespec/vector-stores/main.tsp"; |
| 2 | import "./common.models.tsp"; |
| 3 | import "@azure-tools/typespec-client-generator-core"; |
| 4 | |
| 5 | using Azure.ClientGenerator.Core; |
| 6 | using TypeSpec.Http; |
| 7 | |
| 8 | namespace OpenAI; |
| 9 | |
| 10 | // This artificial type facilitates the merged representation of input/output chunking strategy values. |
| 11 | |
| 12 | @discriminator("type") |
| 13 | model DotNetCombinedChunkingStrategyParam { |
| 14 | type: "auto" | "static" | "other"; |
| 15 | } |
| 16 | |
| 17 | @access(Access.public) |
| 18 | @usage(Usage.input | Usage.output) |
| 19 | model DotNetCombinedAutoChunkingStrategyParam |
| 20 | extends DotNetCombinedChunkingStrategyParam { |
| 21 | ...AutoChunkingStrategyRequestParam; |
| 22 | } |
| 23 | |
| 24 | @access(Access.public) |
| 25 | @usage(Usage.input | Usage.output) |
| 26 | model DotNetCombinedStaticChunkingStrategyParam |
| 27 | extends DotNetCombinedChunkingStrategyParam { |
| 28 | ...StaticChunkingStrategyResponseParam; |
| 29 | } |
| 30 | |
| 31 | @access(Access.public) |
| 32 | @usage(Usage.input | Usage.output) |
| 33 | model DotNetCombinedOtherChunkingStrategyParam |
| 34 | extends DotNetCombinedChunkingStrategyParam { |
| 35 | ...OtherChunkingStrategyResponseParam; |
| 36 | } |
| 37 | |
| 38 | @access(Access.public) |
| 39 | @usage(Usage.input) |
| 40 | model VectorStoreCollectionOptions { |
| 41 | ...DotNetCollectionAfterQueryParameter, |
| 42 | ...DotNetCollectionBeforeQueryParameter, |
| 43 | ...DotNetCollectionLimitQueryParameter, |
| 44 | ...PageOrderQueryParameter, |
| 45 | } |
| 46 | |
| 47 | alias VectorStoreFileCollectionOrderQueryParameter = { |
| 48 | /** |
| 49 | * Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` |
| 50 | * for descending order. |
| 51 | */ |
| 52 | @query order?: VectorStoreFileCollectionOrder; |
| 53 | }; |
| 54 | |
| 55 | union VectorStoreFileCollectionOrder { |
| 56 | string, |
| 57 | Ascending: "asc", |
| 58 | Descending: "desc", |
| 59 | } |
| 60 | |
| 61 | @access(Access.public) |
| 62 | @usage(Usage.input) |
| 63 | model VectorStoreFileCollectionOptions { |
| 64 | ...DotNetCollectionAfterQueryParameter, |
| 65 | ...DotNetCollectionBeforeQueryParameter, |
| 66 | ...DotNetCollectionLimitQueryParameter, |
| 67 | ...VectorStoreFileCollectionOrderQueryParameter, |
| 68 | |
| 69 | @query filter?: ListVectorStoreFilesFilter; |
| 70 | } |
| 71 | |
| 72 | enum VectorStoreExpirationAnchor { |
| 73 | last_active_at, |
| 74 | } |
| 75 | |