carbon_ruby_sdk 0.2.51 → 0.2.52

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 496084d1819fd6c66b31474be535b8cdbd7d985f960dfb765b0c0a0ee2a47d15
4
- data.tar.gz: c036f7ae2ecebf464656ad576e6c637029548f92ac83b073f08e24767ae90b10
3
+ metadata.gz: 54518051d1fd7fb74f26cf78288de54866a637bc84c0b69fc185e614a7f37a1c
4
+ data.tar.gz: 8c230adc37573d4d7edee995df6460fa34bb657252223a708982259b862596b4
5
5
  SHA512:
6
- metadata.gz: 1b9f0a1a1fbf0d8feafe9289b2bd5a8a835232ef5cd9c051404a2b94e8994aa97952383a091aef2f70f629303c52f5aa9fe7ec80d408f7f571adf98dd31a909d
7
- data.tar.gz: c47def780037b437c3f66f0c40d630f2612004306731c23fd24be58a29a317e2ef48fe577fefce7312f7667893b89df40fe0f8dee1c02ea2e19e5785801ae256
6
+ metadata.gz: 52ae687b791d0313ab42c1721932e621fa63f75c533d31c7104e102ef3d77aa761ab14acb5fc6e450f3a71fedb5bc8fb7238064d364408d4e780cb3e6e0bb9cd
7
+ data.tar.gz: 29db65b47781bcc0f1bd4bbe1d399d6a95ed5906d2cdda8e6168cbc5fd2e4958291b9a7dd81fe722a6919e9fca1f8f6cd1c9791ab2c69870b07af376d6af23fe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- carbon_ruby_sdk (0.2.51)
4
+ carbon_ruby_sdk (0.2.52)
5
5
  faraday (>= 1.0.1, < 3.0)
6
6
  faraday-multipart (~> 1.0, >= 1.0.4)
7
7
 
@@ -67,7 +67,7 @@ GEM
67
67
  rubocop-ast (>= 1.2.0, < 2.0)
68
68
  ruby-progressbar (~> 1.7)
69
69
  unicode-display_width (>= 1.4.0, < 3.0)
70
- rubocop-ast (1.36.1)
70
+ rubocop-ast (1.36.2)
71
71
  parser (>= 3.3.1.0)
72
72
  ruby-progressbar (1.13.0)
73
73
  ruby2_keywords (0.0.5)
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Connect external data to LLMs, no matter the source.
8
8
 
9
- [![npm](https://img.shields.io/badge/gem-v0.2.51-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.51)
9
+ [![npm](https://img.shields.io/badge/gem-v0.2.52-blue)](https://rubygems.org/gems/carbon_ruby_sdk/versions/0.2.52)
10
10
 
11
11
  </div>
12
12
 
@@ -121,7 +121,7 @@ Connect external data to LLMs, no matter the source.
121
121
  Add to Gemfile:
122
122
 
123
123
  ```ruby
124
- gem 'carbon_ruby_sdk', '~> 0.2.51'
124
+ gem 'carbon_ruby_sdk', '~> 0.2.52'
125
125
  ```
126
126
 
127
127
  ## Getting Started<a id="getting-started"></a>
@@ -2287,6 +2287,7 @@ result = carbon.integrations.connect_document360(
2287
2287
  "generate_chunks_only" => false,
2288
2288
  "store_file_only" => false,
2289
2289
  "skip_file_processing" => false,
2290
+ "parsed_text_format" => "PLAIN_TEXT",
2290
2291
  },
2291
2292
  data_source_tags: {},
2292
2293
  )
@@ -2365,6 +2366,7 @@ result = carbon.integrations.connect_freshdesk(
2365
2366
  "generate_chunks_only" => false,
2366
2367
  "store_file_only" => false,
2367
2368
  "skip_file_processing" => false,
2369
+ "parsed_text_format" => "PLAIN_TEXT",
2368
2370
  },
2369
2371
  data_source_tags: {},
2370
2372
  )
@@ -2439,6 +2441,7 @@ result = carbon.integrations.connect_gitbook(
2439
2441
  "generate_chunks_only" => false,
2440
2442
  "store_file_only" => false,
2441
2443
  "skip_file_processing" => false,
2444
+ "parsed_text_format" => "PLAIN_TEXT",
2442
2445
  },
2443
2446
  data_source_tags: {},
2444
2447
  )
@@ -2511,6 +2514,7 @@ result = carbon.integrations.connect_guru(
2511
2514
  "generate_chunks_only" => false,
2512
2515
  "store_file_only" => false,
2513
2516
  "skip_file_processing" => false,
2517
+ "parsed_text_format" => "PLAIN_TEXT",
2514
2518
  },
2515
2519
  data_source_tags: {},
2516
2520
  )
@@ -2655,6 +2659,7 @@ result = carbon.integrations.get_oauth_url(
2655
2659
  "generate_chunks_only" => false,
2656
2660
  "store_file_only" => false,
2657
2661
  "skip_file_processing" => false,
2662
+ "parsed_text_format" => "PLAIN_TEXT",
2658
2663
  },
2659
2664
  automatically_open_file_picker: true,
2660
2665
  gong_account_email: "string_example",
@@ -3087,6 +3092,7 @@ result = carbon.integrations.sync_azure_blob_files(
3087
3092
  "generate_chunks_only" => false,
3088
3093
  "store_file_only" => false,
3089
3094
  "skip_file_processing" => false,
3095
+ "parsed_text_format" => "PLAIN_TEXT",
3090
3096
  },
3091
3097
  )
3092
3098
  p result
@@ -3220,6 +3226,7 @@ result = carbon.integrations.sync_confluence(
3220
3226
  "generate_chunks_only" => false,
3221
3227
  "store_file_only" => false,
3222
3228
  "skip_file_processing" => false,
3229
+ "parsed_text_format" => "PLAIN_TEXT",
3223
3230
  },
3224
3231
  )
3225
3232
  p result
@@ -3330,6 +3337,7 @@ result = carbon.integrations.sync_files(
3330
3337
  "generate_chunks_only" => false,
3331
3338
  "store_file_only" => false,
3332
3339
  "skip_file_processing" => false,
3340
+ "parsed_text_format" => "PLAIN_TEXT",
3333
3341
  },
3334
3342
  )
3335
3343
  p result
@@ -3447,6 +3455,7 @@ result = carbon.integrations.sync_gitbook(
3447
3455
  "generate_chunks_only" => false,
3448
3456
  "store_file_only" => false,
3449
3457
  "skip_file_processing" => false,
3458
+ "parsed_text_format" => "PLAIN_TEXT",
3450
3459
  },
3451
3460
  )
3452
3461
  p result
@@ -3556,6 +3565,7 @@ result = carbon.integrations.sync_gmail(
3556
3565
  "generate_chunks_only" => false,
3557
3566
  "store_file_only" => false,
3558
3567
  "skip_file_processing" => false,
3568
+ "parsed_text_format" => "PLAIN_TEXT",
3559
3569
  },
3560
3570
  incremental_sync: false,
3561
3571
  )
@@ -3680,6 +3690,7 @@ result = carbon.integrations.sync_outlook(
3680
3690
  "generate_chunks_only" => false,
3681
3691
  "store_file_only" => false,
3682
3692
  "skip_file_processing" => false,
3693
+ "parsed_text_format" => "PLAIN_TEXT",
3683
3694
  },
3684
3695
  incremental_sync: false,
3685
3696
  )
@@ -3833,6 +3844,7 @@ result = carbon.integrations.sync_s3_files(
3833
3844
  "generate_chunks_only" => false,
3834
3845
  "store_file_only" => false,
3835
3846
  "skip_file_processing" => false,
3847
+ "parsed_text_format" => "PLAIN_TEXT",
3836
3848
  },
3837
3849
  )
3838
3850
  p result
@@ -37,6 +37,9 @@ module Carbon
37
37
  # Setting this flag will create a new file record with Carbon but skip any and all processing. This means that we do not download the remote file content or generate any chunks or embeddings. We will store some metadata like name, external id, and external URL depending on the source you are syncing from. Note that this flag overrides both skip_embedding_generation and generate_chunks_only flags. The file will be moved to READY_TO_SYNC status.
38
38
  attr_accessor :skip_file_processing
39
39
 
40
+ # The format in which the text content of the file should be parsed. Notion files are the only files that support this feature. The default parsed text format is plain text.
41
+ attr_accessor :parsed_text_format
42
+
40
43
  # Attribute mapping from ruby-style variable name to JSON key.
41
44
  def self.attribute_map
42
45
  {
@@ -48,7 +51,8 @@ module Carbon
48
51
  :'split_rows' => :'split_rows',
49
52
  :'generate_chunks_only' => :'generate_chunks_only',
50
53
  :'store_file_only' => :'store_file_only',
51
- :'skip_file_processing' => :'skip_file_processing'
54
+ :'skip_file_processing' => :'skip_file_processing',
55
+ :'parsed_text_format' => :'parsed_text_format'
52
56
  }
53
57
  end
54
58
 
@@ -68,7 +72,8 @@ module Carbon
68
72
  :'split_rows' => :'Boolean',
69
73
  :'generate_chunks_only' => :'Boolean',
70
74
  :'store_file_only' => :'Boolean',
71
- :'skip_file_processing' => :'Boolean'
75
+ :'skip_file_processing' => :'Boolean',
76
+ :'parsed_text_format' => :'ParsedTextFormatsNullable'
72
77
  }
73
78
  end
74
79
 
@@ -76,6 +81,7 @@ module Carbon
76
81
  def self.openapi_nullable
77
82
  Set.new([
78
83
  :'transcription_service',
84
+ :'parsed_text_format'
79
85
  ])
80
86
  end
81
87
 
@@ -145,6 +151,10 @@ module Carbon
145
151
  else
146
152
  self.skip_file_processing = false
147
153
  end
154
+
155
+ if attributes.key?(:'parsed_text_format')
156
+ self.parsed_text_format = attributes[:'parsed_text_format']
157
+ end
148
158
  end
149
159
 
150
160
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -173,7 +183,8 @@ module Carbon
173
183
  split_rows == o.split_rows &&
174
184
  generate_chunks_only == o.generate_chunks_only &&
175
185
  store_file_only == o.store_file_only &&
176
- skip_file_processing == o.skip_file_processing
186
+ skip_file_processing == o.skip_file_processing &&
187
+ parsed_text_format == o.parsed_text_format
177
188
  end
178
189
 
179
190
  # @see the `==` method
@@ -185,7 +196,7 @@ module Carbon
185
196
  # Calculates hash code according to all attributes.
186
197
  # @return [Integer] Hash code
187
198
  def hash
188
- [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only, store_file_only, skip_file_processing].hash
199
+ [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only, store_file_only, skip_file_processing, parsed_text_format].hash
189
200
  end
190
201
 
191
202
  # Builds the object from hash
@@ -38,6 +38,9 @@ module Carbon
38
38
  # Setting this flag will create a new file record with Carbon but skip any and all processing. This means that we do not download the remote file content or generate any chunks or embeddings. We will store some metadata like name, external id, and external URL depending on the source you are syncing from. Note that this flag overrides both skip_embedding_generation and generate_chunks_only flags. The file will be moved to READY_TO_SYNC status.
39
39
  attr_accessor :skip_file_processing
40
40
 
41
+ # The format in which the text content of the file should be parsed. Notion files are the only files that support this feature. The default parsed text format is plain text.
42
+ attr_accessor :parsed_text_format
43
+
41
44
  # Attribute mapping from ruby-style variable name to JSON key.
42
45
  def self.attribute_map
43
46
  {
@@ -49,7 +52,8 @@ module Carbon
49
52
  :'split_rows' => :'split_rows',
50
53
  :'generate_chunks_only' => :'generate_chunks_only',
51
54
  :'store_file_only' => :'store_file_only',
52
- :'skip_file_processing' => :'skip_file_processing'
55
+ :'skip_file_processing' => :'skip_file_processing',
56
+ :'parsed_text_format' => :'parsed_text_format'
53
57
  }
54
58
  end
55
59
 
@@ -69,7 +73,8 @@ module Carbon
69
73
  :'split_rows' => :'Boolean',
70
74
  :'generate_chunks_only' => :'Boolean',
71
75
  :'store_file_only' => :'Boolean',
72
- :'skip_file_processing' => :'Boolean'
76
+ :'skip_file_processing' => :'Boolean',
77
+ :'parsed_text_format' => :'ParsedTextFormatsNullable'
73
78
  }
74
79
  end
75
80
 
@@ -77,6 +82,7 @@ module Carbon
77
82
  def self.openapi_nullable
78
83
  Set.new([
79
84
  :'transcription_service',
85
+ :'parsed_text_format'
80
86
  ])
81
87
  end
82
88
 
@@ -146,6 +152,10 @@ module Carbon
146
152
  else
147
153
  self.skip_file_processing = false
148
154
  end
155
+
156
+ if attributes.key?(:'parsed_text_format')
157
+ self.parsed_text_format = attributes[:'parsed_text_format']
158
+ end
149
159
  end
150
160
 
151
161
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -174,7 +184,8 @@ module Carbon
174
184
  split_rows == o.split_rows &&
175
185
  generate_chunks_only == o.generate_chunks_only &&
176
186
  store_file_only == o.store_file_only &&
177
- skip_file_processing == o.skip_file_processing
187
+ skip_file_processing == o.skip_file_processing &&
188
+ parsed_text_format == o.parsed_text_format
178
189
  end
179
190
 
180
191
  # @see the `==` method
@@ -186,7 +197,7 @@ module Carbon
186
197
  # Calculates hash code according to all attributes.
187
198
  # @return [Integer] Hash code
188
199
  def hash
189
- [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only, store_file_only, skip_file_processing].hash
200
+ [auto_synced_source_types, sync_attachments, detect_audio_language, transcription_service, include_speaker_labels, split_rows, generate_chunks_only, store_file_only, skip_file_processing, parsed_text_format].hash
190
201
  end
191
202
 
192
203
  # Builds the object from hash
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class ParsedTextFormats
14
+ PLAIN_TEXT = "PLAIN_TEXT".freeze
15
+ MARKDOWN = "MARKDOWN".freeze
16
+
17
+ def self.all_vars
18
+ @all_vars ||= [PLAIN_TEXT, MARKDOWN].freeze
19
+ end
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ return value if ParsedTextFormats.all_vars.include?(value)
33
+ raise "Invalid ENUM value #{value} for class #ParsedTextFormats"
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class ParsedTextFormatsNullable
14
+ PLAIN_TEXT = "PLAIN_TEXT".freeze
15
+ MARKDOWN = "MARKDOWN".freeze
16
+
17
+ def self.all_vars
18
+ @all_vars ||= [PLAIN_TEXT, MARKDOWN].freeze
19
+ end
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ return value if ParsedTextFormatsNullable.all_vars.include?(value)
33
+ raise "Invalid ENUM value #{value} for class #ParsedTextFormatsNullable"
34
+ end
35
+ end
36
+ end
@@ -7,5 +7,5 @@ The version of the OpenAPI document: 1.0.0
7
7
  =end
8
8
 
9
9
  module Carbon
10
- VERSION = '0.2.51'
10
+ VERSION = '0.2.52'
11
11
  end
@@ -210,6 +210,8 @@ require 'carbon_ruby_sdk/models/pr_order_by'
210
210
  require 'carbon_ruby_sdk/models/pr_state'
211
211
  require 'carbon_ruby_sdk/models/pr_state_input'
212
212
  require 'carbon_ruby_sdk/models/pagination'
213
+ require 'carbon_ruby_sdk/models/parsed_text_formats'
214
+ require 'carbon_ruby_sdk/models/parsed_text_formats_nullable'
213
215
  require 'carbon_ruby_sdk/models/partial_account'
214
216
  require 'carbon_ruby_sdk/models/partial_account_nullable'
215
217
  require 'carbon_ruby_sdk/models/partial_contact'
@@ -73,4 +73,10 @@ describe Carbon::FileSyncConfigNullable do
73
73
  end
74
74
  end
75
75
 
76
+ describe 'test attribute "parsed_text_format"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ end
80
+ end
81
+
76
82
  end
@@ -73,4 +73,10 @@ describe Carbon::FileSyncConfig do
73
73
  end
74
74
  end
75
75
 
76
+ describe 'test attribute "parsed_text_format"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
79
+ end
80
+ end
81
+
76
82
  end
@@ -0,0 +1,22 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::ParsedTextFormatsNullable
14
+ describe Carbon::ParsedTextFormatsNullable do
15
+ let(:instance) { Carbon::ParsedTextFormatsNullable.new }
16
+
17
+ describe 'test an instance of ParsedTextFormatsNullable' do
18
+ it 'should create an instance of ParsedTextFormatsNullable' do
19
+ expect(instance).to be_instance_of(Carbon::ParsedTextFormatsNullable)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'spec_helper'
10
+ require 'json'
11
+ require 'date'
12
+
13
+ # Unit tests for Carbon::ParsedTextFormats
14
+ describe Carbon::ParsedTextFormats do
15
+ let(:instance) { Carbon::ParsedTextFormats.new }
16
+
17
+ describe 'test an instance of ParsedTextFormats' do
18
+ it 'should create an instance of ParsedTextFormats' do
19
+ expect(instance).to be_instance_of(Carbon::ParsedTextFormats)
20
+ end
21
+ end
22
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carbon_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.51
4
+ version: 0.2.52
5
5
  platform: ruby
6
6
  authors:
7
7
  - Konfig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-19 00:00:00.000000000 Z
11
+ date: 2024-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -289,6 +289,8 @@ files:
289
289
  - lib/carbon_ruby_sdk/models/outh_url_response.rb
290
290
  - lib/carbon_ruby_sdk/models/outlook_sync_input.rb
291
291
  - lib/carbon_ruby_sdk/models/pagination.rb
292
+ - lib/carbon_ruby_sdk/models/parsed_text_formats.rb
293
+ - lib/carbon_ruby_sdk/models/parsed_text_formats_nullable.rb
292
294
  - lib/carbon_ruby_sdk/models/partial_account.rb
293
295
  - lib/carbon_ruby_sdk/models/partial_account_nullable.rb
294
296
  - lib/carbon_ruby_sdk/models/partial_contact.rb
@@ -600,6 +602,8 @@ files:
600
602
  - spec/models/outh_url_response_spec.rb
601
603
  - spec/models/outlook_sync_input_spec.rb
602
604
  - spec/models/pagination_spec.rb
605
+ - spec/models/parsed_text_formats_nullable_spec.rb
606
+ - spec/models/parsed_text_formats_spec.rb
603
607
  - spec/models/partial_account_nullable_spec.rb
604
608
  - spec/models/partial_account_spec.rb
605
609
  - spec/models/partial_contact_nullable_spec.rb
@@ -751,6 +755,7 @@ test_files:
751
755
  - spec/models/pull_requests_input_spec.rb
752
756
  - spec/models/embedding_generators_nullable_spec.rb
753
757
  - spec/models/issues_input_spec.rb
758
+ - spec/models/parsed_text_formats_nullable_spec.rb
754
759
  - spec/models/slack_filters_spec.rb
755
760
  - spec/models/contact_spec.rb
756
761
  - spec/models/add_webhook_props_spec.rb
@@ -883,6 +888,7 @@ test_files:
883
888
  - spec/models/external_file_sync_statuses_spec.rb
884
889
  - spec/models/partial_contact_nullable_spec.rb
885
890
  - spec/models/pr_state_input_spec.rb
891
+ - spec/models/parsed_text_formats_spec.rb
886
892
  - spec/models/organization_response_spec.rb
887
893
  - spec/models/issue_pr_spec.rb
888
894
  - spec/models/zotero_authentication_source_spec.rb