11// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22
33import { APIResource } from '../../core/resource' ;
4- import * as ModelsAPI from '../models/models ' ;
4+ import * as PassagesAPI from '../passages ' ;
55import { APIPromise } from '../../core/api-promise' ;
66import { buildHeaders } from '../../internal/headers' ;
77import { RequestOptions } from '../../internal/request-options' ;
@@ -17,7 +17,7 @@ export class Passages extends APIResource {
1717 archiveID : string ,
1818 body : PassageCreateParams ,
1919 options ?: RequestOptions ,
20- ) : APIPromise < PassageCreateResponse > {
20+ ) : APIPromise < PassagesAPI . Passage > {
2121 return this . _client . post ( path `/v1/archives/${ archiveID } /passages` , { body, ...options } ) ;
2222 }
2323
@@ -36,87 +36,6 @@ export class Passages extends APIResource {
3636 }
3737}
3838
39- /**
40- * Representation of a passage, which is stored in archival memory.
41- */
42- export interface PassageCreateResponse {
43- /**
44- * The embedding of the passage.
45- */
46- embedding : Array < number > | null ;
47-
48- /**
49- * Configuration for embedding model connection and processing parameters.
50- */
51- embedding_config : ModelsAPI . EmbeddingConfig | null ;
52-
53- /**
54- * The text of the passage.
55- */
56- text : string ;
57-
58- /**
59- * The human-friendly ID of the Passage
60- */
61- id ?: string ;
62-
63- /**
64- * The unique identifier of the archive containing this passage.
65- */
66- archive_id ?: string | null ;
67-
68- /**
69- * The creation date of the passage.
70- */
71- created_at ?: string ;
72-
73- /**
74- * The id of the user that made this object.
75- */
76- created_by_id ?: string | null ;
77-
78- /**
79- * The unique identifier of the file associated with the passage.
80- */
81- file_id ?: string | null ;
82-
83- /**
84- * The name of the file (only for source passages).
85- */
86- file_name ?: string | null ;
87-
88- /**
89- * Whether this passage is deleted or not.
90- */
91- is_deleted ?: boolean ;
92-
93- /**
94- * The id of the user that made this object.
95- */
96- last_updated_by_id ?: string | null ;
97-
98- /**
99- * The metadata of the passage.
100- */
101- metadata ?: { [ key : string ] : unknown } | null ;
102-
103- /**
104- * @deprecated Deprecated: Use `folder_id` field instead. The data source of the
105- * passage.
106- */
107- source_id ?: string | null ;
108-
109- /**
110- * Tags associated with this passage.
111- */
112- tags ?: Array < string > | null ;
113-
114- /**
115- * The timestamp when the object was last updated.
116- */
117- updated_at ?: string | null ;
118- }
119-
12039export interface PassageCreateParams {
12140 /**
12241 * The text content of the passage
@@ -142,9 +61,5 @@ export interface PassageDeleteParams {
14261}
14362
14463export declare namespace Passages {
145- export {
146- type PassageCreateResponse as PassageCreateResponse ,
147- type PassageCreateParams as PassageCreateParams ,
148- type PassageDeleteParams as PassageDeleteParams ,
149- } ;
64+ export { type PassageCreateParams as PassageCreateParams , type PassageDeleteParams as PassageDeleteParams } ;
15065}
0 commit comments