fabricatio 0.2.6.dev6__cp312-cp312-manylinux_2_34_x86_64.whl → 0.2.6.dev7__cp312-cp312-manylinux_2_34_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ from fabricatio.config import configs
15
15
  from fabricatio.journal import logger
16
16
  from fabricatio.models.kwargs_types import (
17
17
  ChooseKwargs,
18
- CollectionSimpleConfigKwargs,
18
+ CollectionConfigKwargs,
19
19
  EmbeddingKwargs,
20
20
  FetchKwargs,
21
21
  LLMKwargs,
@@ -102,14 +102,14 @@ class RAG(EmbeddingUsage):
102
102
  ]
103
103
 
104
104
  def view(
105
- self, collection_name: Optional[str], create: bool = False, **kwargs: Unpack[CollectionSimpleConfigKwargs]
105
+ self, collection_name: Optional[str], create: bool = False, **kwargs: Unpack[CollectionConfigKwargs]
106
106
  ) -> Self:
107
107
  """View the specified collection.
108
108
 
109
109
  Args:
110
110
  collection_name (str): The name of the collection.
111
111
  create (bool): Whether to create the collection if it does not exist.
112
- **kwargs (Unpack[CollectionSimpleConfigKwargs]): Additional keyword arguments for collection configuration.
112
+ **kwargs (Unpack[CollectionConfigKwargs]): Additional keyword arguments for collection configuration.
113
113
  """
114
114
  if create and collection_name and self.client.has_collection(collection_name):
115
115
  kwargs["dimension"] = kwargs.get("dimension") or self.milvus_dimensions or configs.rag.milvus_dimensions
@@ -1,11 +1,12 @@
1
1
  """Extra models for built-in actions."""
2
2
 
3
- from typing import List
3
+ from typing import List, Self
4
4
 
5
5
  from fabricatio.models.generic import Base, Display, FinalizedDumpAble, PrepareVectorization, ProposedAble
6
6
  from pydantic import Field
7
7
 
8
8
 
9
+ # <editor-fold desc="ArticleEssence">
9
10
  class Equation(Base):
10
11
  """Mathematical formalism specification for research contributions.
11
12
 
@@ -200,6 +201,9 @@ class ArticleEssence(ProposedAble, Display, PrepareVectorization):
200
201
  return self.model_dump_json()
201
202
 
202
203
 
204
+ # </editor-fold>
205
+
206
+
203
207
  class ArticleProposal(ProposedAble, Display):
204
208
  """Structured proposal for academic paper development with core research elements.
205
209
 
@@ -221,119 +225,434 @@ class ArticleProposal(ProposedAble, Display):
221
225
  """Methodological components (list of techniques/tools).
222
226
  Example: ['Differentiable architecture search', 'Transformer-based search space', 'Multi-lingual perplexity evaluation']"""
223
227
 
228
+ technical_approaches: List[str] = Field(default_factory=list)
224
229
 
225
- class ArticleSubsectionOutline(Base):
226
- """Atomic content unit within academic paper sections.
227
230
 
228
- Provides structured content specification for LLM-generated subsections.
229
- """
231
+ # <editor-fold desc="ArticleOutline">
232
+ class ArticleSubsectionOutline(Base):
233
+ """Atomic research component specification for academic paper generation."""
230
234
 
231
235
  title: str = Field(...)
232
- """Subsection title reflecting specific content focus (Title Case, 3-8 words).
233
- Example: 'Differentiable Search Space Design'"""
236
+ """Technical focus descriptor following ACL title conventions:
237
+ - Title Case with 4-8 word limit
238
+ - Contains method and domain components
239
+ Example: 'Differentiable Search Space Optimization'"""
234
240
 
235
241
  description: str = Field(...)
236
- """Content specification with three required elements:
237
- 1. Core technical content
238
- 2. Structural purpose in section
239
- 3. Research significance
240
- Example: 'Introduces continuous relaxation method for search space, enabling gradient-based optimization. Forms technical foundation for Section 3. Critical for reducing search complexity.'"""
242
+ """Tripartite content specification with strict structure:
243
+ 1. Technical Core: Method/algorithm/formalism (1 sentence)
244
+ 2. Structural Role: Placement rationale in section (1 clause)
245
+ 3. Research Value: Contribution to paper's thesis (1 clause)
241
246
 
247
+ Example: 'Introduces entropy-constrained architecture parameters enabling
248
+ gradient-based NAS. Serves as foundation for Section 3.2. Critical for
249
+ maintaining search space diversity while ensuring convergence.'"""
242
250
 
243
- class ArticleSectionOutline(Base):
244
- """Primary organizational unit within paper chapters.
245
251
 
246
- Defines section-level structure with nested subsections for hierarchical content organization.
247
- """
252
+ class ArticleSectionOutline(Base):
253
+ """Methodological unit organizing related technical components."""
248
254
 
249
255
  title: str = Field(...)
250
- """Section title indicating methodological phase or conceptual component (Title Case).
251
- Example: 'Architecture Search Methodology'"""
256
+ """Process-oriented header with phase identification:
257
+ - Title Case with 5-10 word limit
258
+ - Indicates research stage/methodological focus
259
+ Example: 'Cross-Lingual Evaluation Protocol'"""
252
260
 
253
261
  description: str = Field(...)
254
- """Functional description covering:
255
- 1. Section's research stage
256
- 2. Key contributions
257
- 3. Flow relationship with adjacent sections
258
- Example: 'Presents core NAS framework building on literature from Section 2. Introduces novel constrained search space. Leads to implementation details in Section 4.'"""
259
-
260
- subsections: List[ArticleSubsectionOutline]
261
- """Ordered sequence of 3-5 subsections implementing IMRaD structure within section. Maintains logical flow from problem statement to technical solution."""
262
+ """Functional specification with four required elements:
263
+ 1. Research Stage: Paper progression position
264
+ 2. Technical Innovations: Novel components
265
+ 3. Scholarly Context: Relationship to prior work
266
+ 4. Forward Flow: Connection to subsequent sections
267
+
268
+ Example: 'Implements constrained NAS framework building on Section 2's
269
+ theoretical foundations. Introduces dynamic resource allocation mechanism.
270
+ Directly supports Results section through ablation study parameters.'"""
271
+
272
+ subsections: List[ArticleSubsectionOutline] = Field(..., min_length=3, max_length=5)
273
+ """IMRaD-compliant substructure with technical progression:
274
+ 1. Conceptual Framework
275
+ 2. Methodological Details
276
+ 3. Implementation Strategy
277
+ 4. Validation Approach
278
+ 5. Transition Logic
279
+
280
+ Example Flow:
281
+ [
282
+ 'Search Space Constraints',
283
+ 'Gradient Optimization Protocol',
284
+ 'Multi-GPU Implementation',
285
+ 'Convergence Validation',
286
+ 'Cross-Lingual Extension'
287
+ ]"""
262
288
 
263
289
 
264
290
  class ArticleChapterOutline(Base):
265
- """Macro-level paper organization unit.
266
-
267
- Represents major paper divisions (Introduction, Methodology, etc.) with hierarchical section structure.
268
- """
291
+ """Macro-structural unit implementing standard academic paper organization."""
269
292
 
270
293
  title: str = Field(...)
271
- """Chapter title reflecting standard academic sections (Title Case).
272
- Example: 'Experimental Evaluation', 'Theoretical Framework'"""
294
+ """IMRaD-compliant chapter title with domain specification:
295
+ - Title Case with 2-4 word limit
296
+ - Matches standard paper sections
297
+ Example: 'Multilingual Evaluation Results'"""
273
298
 
274
299
  description: str = Field(...)
275
- """Chapter role specification containing:
276
- 1. Research phase covered
277
- 2. Chapter-specific objectives
278
- 3. Relationship to overall paper thesis
279
- Example: 'Validates NAS framework through multilingual experiments. Demonstrates method effectiveness across 10 language pairs. Supports core thesis of parameter-efficient architecture search.'"""
280
-
281
- sections: List[ArticleSectionOutline]
282
- """3-5 sections implementing chapter's main function. Ordered to maintain academic paper logic:
283
- Introduction Related Work Methods → Experiments → Analysis"""
300
+ """Strategic chapter definition containing:
301
+ 1. Research Phase: Introduction/Methods/Results/etc.
302
+ 2. Chapter Objectives: 3-5 specific goals
303
+ 3. Thesis Alignment: Supported claims/contributions
304
+ 4. Structural Flow: Adjacent chapter relationships
305
+
306
+ Example: 'Presents cross-lingual NAS results across 10 language pairs.
307
+ Validates efficiency claims from Introduction. Provides empirical basis
308
+ for Discussion chapter. Contrasts with single-language baselines.'"""
309
+
310
+ sections: List[ArticleSectionOutline] = Field(..., min_length=3, max_length=5)
311
+ """Standard academic progression implementing chapter goals:
312
+ 1. Context Establishment
313
+ 2. Technical Presentation
314
+ 3. Empirical Validation
315
+ 4. Comparative Analysis
316
+ 5. Synthesis
317
+
318
+ Example Structure:
319
+ [
320
+ 'Experimental Setup',
321
+ 'Monolingual Baselines',
322
+ 'Cross-Lingual Transfer',
323
+ 'Low-Resource Scaling',
324
+ 'Error Analysis'
325
+ ]"""
284
326
 
285
327
 
286
328
  class ArticleOutline(ProposedAble, Display, FinalizedDumpAble):
287
- """Complete hierarchical structure for academic paper generation.
288
-
289
- Provides multi-level outline specification for LLM-based paper drafting with strict academic conventions.
290
- """
329
+ """Complete academic paper blueprint with hierarchical validation."""
291
330
 
292
331
  title: str = Field(...)
293
- """Full paper title with technical specificity (Title Case, 12-18 words).
294
- Example: 'Parameter-Efficient Neural Architecture Search for Low-Resource Machine Translation: A Cross-Lingual Transfer Approach'"""
332
+ """Full technical title following ACL 2024 guidelines:
333
+ - Title Case with 12-18 word limit
334
+ - Structure: [Method] for [Task] via [Approach] in [Domain]
335
+ Example: 'Efficient Differentiable NAS for Low-Resource MT Through
336
+ Parameter-Sharing: A Cross-Lingual Study'"""
295
337
 
296
338
  prospect: str = Field(...)
297
- """Unified problem-solution statement combining:
298
- 1. Core research gap
299
- 2. Proposed methodology
300
- 3. Expected contribution
301
- Example: 'Addressing NAS computational barriers in low-resource NLP through differentiable constrained search spaces and cross-lingual transfer metrics, enabling efficient architecture discovery for 50+ languages.'"""
302
-
303
- chapters: List[ArticleChapterOutline]
304
- """Standard academic structure (5-8 chapters):
305
- 1. Introduction
306
- 2. Related Work
307
- 3. Methodology
308
- 4. Experiments
309
- 5. Results
310
- 6. Discussion
311
- 7. Conclusion
312
- Maintains IMRaD logical flow with clear inter-chapter transitions."""
339
+ """Consolidated research statement with four pillars:
340
+ 1. Problem Identification: Current limitations
341
+ 2. Methodological Response: Technical approach
342
+ 3. Empirical Validation: Evaluation strategy
343
+ 4. Scholarly Impact: Field contributions
344
+
345
+ Example: 'Addressing NAS computational barriers through constrained
346
+ differentiable search spaces, validated via cross-lingual MT experiments
347
+ across 50+ languages, enabling efficient architecture discovery with
348
+ 60% reduced search costs.'"""
349
+
350
+ chapters: List[ArticleChapterOutline] = Field(..., min_length=5, max_length=8)
351
+ """IMRaD structure with enhanced academic validation:
352
+ 1. Introduction: Problem Space & Contributions
353
+ 2. Background: Theoretical Foundations
354
+ 3. Methods: Technical Innovations
355
+ 4. Experiments: Protocol Design
356
+ 5. Results: Empirical Findings
357
+ 6. Discussion: Interpretation & Limitations
358
+ 7. Conclusion: Synthesis & Future Work
359
+ 8. Appendices: Supplementary Materials"""
313
360
 
314
361
  def finalized_dump(self) -> str:
315
- """Generates standardized hierarchical markup for paper drafting systems.
362
+ """Generates standardized hierarchical markup for academic publishing systems.
363
+
364
+ Implements ACL 2024 outline conventions with four-level structure:
365
+ = Chapter Title (Level 1)
366
+ == Section Title (Level 2)
367
+ === Subsection Title (Level 3)
368
+ ==== Subsubsection Title (Level 4)
316
369
 
317
370
  Returns:
318
- str: Multi-level outline using academic markup conventions:
319
- = Chapter Title
320
- == Section Title
321
- === Subsection Title
322
- ==== Subsubsection Title (if needed)
371
+ str: Strictly formatted outline with academic sectioning
323
372
 
324
373
  Example:
325
374
  = Methodology
326
375
  == Neural Architecture Search Framework
327
376
  === Differentiable Search Space
328
- === Constrained Optimization Approach
377
+ ==== Constrained Optimization Parameters
378
+ === Implementation Details
379
+ == Evaluation Protocol
329
380
  """
330
381
  lines: List[str] = []
382
+ for i, chapter in enumerate(self.chapters, 1):
383
+ lines.append(f"= Chapter {i}: {chapter.title}")
384
+ for j, section in enumerate(chapter.sections, 1):
385
+ lines.append(f"== {i}.{j} {section.title}")
386
+ for k, subsection in enumerate(section.subsections, 1):
387
+ lines.append(f"=== {i}.{j}.{k} {subsection.title}")
388
+ return "\n".join(lines)
389
+
390
+
391
+ # </editor-fold>
392
+
393
+
394
+ # <editor-fold desc="Article">
395
+ class Paragraph(ProposedAble):
396
+ """Structured academic paragraph blueprint for controlled content generation."""
397
+
398
+ description: str
399
+ """Functional summary of the paragraph's role in document structure.
400
+ Example: 'Establishes NAS efficiency improvements through differentiable methods'"""
401
+
402
+ writing_aim: List[str]
403
+ """Specific communicative objectives for this paragraph's content.
404
+ Example: ['Introduce gradient-based NAS', 'Compare computational costs',
405
+ 'Link efficiency to practical applications']"""
406
+
407
+ lines: List[str]
408
+ """Hierarchically structured content with enforced rhetorical elements:
409
+ 1. Topic Sentence: Principal claim/position (1 sentence)
410
+ 2. Development: Evidence chain with citations (2-4 sentences)
411
+ 3. Synthesis: Interpretation & significance (1 sentence)
412
+ 4. Transition: Logical bridge to next paragraph (optional)
413
+
414
+ Example: [
415
+ 'Differentiable NAS revolutionized architecture search efficiency.',
416
+ 'DARTS reduced search costs from 2000+ to 4 GPU days (Liu et al., 2019) while maintaining competitive ImageNet accuracy.',
417
+ 'This order-of-magnitude improvement enables NAS deployment in resource-constrained research contexts.',
418
+ 'These efficiency gains directly impact our framework's design choices as detailed in Section 3.'
419
+ ]"""
420
+
421
+
422
+ class SectionRef(ProposedAble):
423
+ """Cross-component reference system for maintaining document consistency."""
424
+
425
+ ref_chapter_title: str
426
+ """Title of referenced chapter (e.g., 'Methodology')"""
427
+
428
+ ref_section_title: str
429
+ """Exact section header text (e.g., '3.2 Gradient Optimization')"""
331
430
 
332
- for chapter in self.chapters:
333
- lines.append(f"= {chapter.title}")
334
- for section in chapter.sections:
335
- lines.append(f"== {section.title}")
336
- for subsection in section.subsections:
337
- lines.append(f"=== {subsection.title}")
431
+ ref_subsection_title: str
432
+ """Specific subsection identifier (e.g., '3.2.1 Learning Rate Scheduling')"""
338
433
 
339
- return "\n\n".join(lines)
434
+
435
+ class ArticleBase(ProposedAble, Display):
436
+ """Foundation for hierarchical document components with dependency tracking."""
437
+
438
+ description: str
439
+ """Functional purpose statement for this component's role in the paper.
440
+ Example: 'Defines evaluation metrics for cross-lingual transfer experiments'"""
441
+
442
+ writing_aim: List[str]
443
+ """Author intentions mapped to rhetorical moves:
444
+ Example: ['Establish metric validity', 'Compare with baseline approaches',
445
+ 'Justify threshold selection']"""
446
+
447
+ title: str = Field(...)
448
+ """Standardized academic header following ACL style guidelines:
449
+ - Title Case with maximal 12-word length
450
+ - No abbreviations without prior definition
451
+ Example: 'Multilingual Benchmark Construction'"""
452
+
453
+ support_to: List[SectionRef]
454
+ """Upstream dependencies requiring this component's validation.
455
+ Format: List of hierarchical references to supported claims/sections
456
+ Example: [SectionRef(chapter='Results', section='4.1', subsection='4.1.2')]"""
457
+
458
+ depend_on: List[SectionRef]
459
+ """Downstream prerequisites for content validity.
460
+ Format: List of references to foundational components
461
+ Example: [SectionRef(chapter='Methods', section='2.3', subsection='2.3.4')]"""
462
+
463
+
464
+ class ArticleSubsection(ArticleBase):
465
+ """Atomic argumentative unit with technical specificity."""
466
+
467
+ title: str = Field(...)
468
+ """Technical descriptor with maximal information density:
469
+ Format: [Method]-[Domain]-[Innovation]
470
+ Example: 'Transformer-Based Architecture Search Space'"""
471
+
472
+ support_to: List[SectionRef]
473
+ """Immediate parent components and supported hypotheses.
474
+ Example: [SectionRef(chapter='Methods', section='3', subsection='3.1')]"""
475
+
476
+ depend_on: List[SectionRef]
477
+ """Technical dependencies including equations, algorithms, and datasets.
478
+ Example: [SectionRef(chapter='Background', section='2.2', subsection='2.2.3')]"""
479
+
480
+ paragraphs: List[Paragraph] = Field(..., min_length=3, max_length=5)
481
+ """Technical exposition following ACM writing guidelines:
482
+ 1. Contextualization: Position in research design
483
+ 2. Technical Detail: Equations/algorithms/code
484
+ 3. Validation: Citations/experimental confirmation
485
+ 4. Interpretation: Scholarly significance
486
+ 5. Transition: Logical connection to subsequent content
487
+
488
+ Example Paragraph Chain:
489
+ [
490
+ 'Our search space builds on standard CNN architectures...',
491
+ 'Formally, we define architecture parameters $\\alpha \\in R^d$ where...',
492
+ 'This parameterization reduces search complexity by 42% compared to...',
493
+ 'The efficiency gains validate our approach to...'
494
+ ]"""
495
+
496
+
497
+ class ArticleSection(ArticleBase):
498
+ """Methodological complete unit presenting cohesive research phase."""
499
+
500
+ title: str = Field(...)
501
+ """Process-oriented header indicating methodological scope.
502
+ Example: 'Cross-Lingual Transfer Evaluation Protocol'"""
503
+
504
+ support_to: List[SectionRef]
505
+ """Supported research questions and paper-level claims.
506
+ Example: [SectionRef(chapter='Introduction', section='1', subsection='1.2')]"""
507
+
508
+ depend_on: List[SectionRef]
509
+ """Required methodological components and theoretical frameworks.
510
+ Example: [SectionRef(chapter='Background', section='2', subsection='2.4')]"""
511
+
512
+ subsections: List[ArticleSubsection] = Field(..., min_length=3, max_length=5)
513
+ """Thematic progression implementing section's research function:
514
+ 1. Conceptual Framework
515
+ 2. Technical Implementation
516
+ 3. Experimental Validation
517
+ 4. Comparative Analysis
518
+ 5. Synthesis
519
+
520
+ Example Subsection Flow:
521
+ [
522
+ 'Evaluation Metrics',
523
+ 'Dataset Preparation',
524
+ 'Baseline Comparisons',
525
+ 'Ablation Studies',
526
+ 'Interpretation Framework'
527
+ ]"""
528
+
529
+
530
+ class ArticleChapter(ArticleBase):
531
+ """Macro-structural unit implementing IMRaD document architecture."""
532
+
533
+ title: str = Field(...)
534
+ """Standard IMRaD chapter title with domain specification.
535
+ Example: 'Neural Architecture Search for Low-Resource Languages'"""
536
+
537
+ support_to: List[SectionRef]
538
+ """Supported thesis statements and paper-level contributions.
539
+ Example: [SectionRef(chapter='Abstract', section='', subsection='')]"""
540
+
541
+ depend_on: List[SectionRef]
542
+ """Foundational chapters and external knowledge prerequisites.
543
+ Example: [SectionRef(chapter='Related Work', section='2', subsection='2.3')]"""
544
+
545
+ sections: List[ArticleSection] = Field(..., min_length=3, max_length=5)
546
+ """Complete research narrative implementing chapter objectives:
547
+ 1. Context Establishment
548
+ 2. Methodology Exposition
549
+ 3. Results Presentation
550
+ 4. Critical Analysis
551
+ 5. Synthesis
552
+
553
+ Example Section Hierarchy:
554
+ [
555
+ 'Theoretical Framework',
556
+ 'Experimental Design',
557
+ 'Results Analysis',
558
+ 'Threats to Validity',
559
+ 'Comparative Discussion'
560
+ ]"""
561
+
562
+
563
+ class Article(ProposedAble, Display):
564
+ """Complete academic paper specification with validation constraints."""
565
+
566
+ title: str = Field(...)
567
+ """Full technical descriptor following ACL 2024 guidelines:
568
+ Structure: [Method] for [Task] in [Domain]: [Subtitle with Technical Focus]
569
+ Example: 'Efficient Differentiable NAS for Low-Resource MT:
570
+ A Parameter-Sharing Approach to Cross-Lingual Transfer'"""
571
+
572
+ abstract: str = Field(...)
573
+ """Structured summary with controlled natural language:
574
+ 1. Context: 2 clauses (problem + gap)
575
+ 2. Methods: 3 clauses (approach + innovation + implementation)
576
+ 3. Results: 3 clauses (metrics + comparisons + significance)
577
+ 4. Impact: 2 clauses (theoretical + practical)
578
+
579
+ Example: 'Neural architecture search (NAS) faces prohibitive... [150 words]'"""
580
+
581
+ chapters: List[ArticleChapter] = Field(..., min_length=5, max_length=8)
582
+ """IMRaD-compliant document structure with enhanced validation:
583
+ 1. Introduction: Motivation & Contributions
584
+ 2. Background: Literature & Theory
585
+ 3. Methods: Technical Implementation
586
+ 4. Experiments: Protocols & Setup
587
+ 5. Results: Empirical Findings
588
+ 6. Discussion: Interpretation & Limitations
589
+ 7. Conclusion: Summary & Future Work
590
+
591
+ Additional: Appendices, Ethics Review, Reproducibility Statements"""
592
+
593
+ def init_from_outline(self, outline: ArticleOutline) -> Self:
594
+ """Initialize the article from a given outline.
595
+
596
+ Args:
597
+ outline (ArticleOutline): The outline to initialize from.
598
+
599
+ Returns:
600
+ Self: The current instance of the article.
601
+ """
602
+ # Set the title from the outline
603
+ self.title = outline.title
604
+
605
+ # Initialize chapters based on outline's chapters
606
+ self.chapters = []
607
+
608
+ for chapter_outline in outline.chapters:
609
+ # Create a new chapter
610
+ chapter = ArticleChapter(
611
+ title=chapter_outline.title,
612
+ description=chapter_outline.description,
613
+ writing_aim=["Implement " + chapter_outline.description],
614
+ support_to=[],
615
+ depend_on=[],
616
+ sections=[],
617
+ )
618
+
619
+ # Create sections for each chapter
620
+ for section_outline in chapter_outline.sections:
621
+ section = ArticleSection(
622
+ title=section_outline.title,
623
+ description=section_outline.description,
624
+ writing_aim=["Address " + section_outline.description],
625
+ support_to=[],
626
+ depend_on=[],
627
+ subsections=[],
628
+ )
629
+
630
+ # Create subsections for each section
631
+ for subsection_outline in section_outline.subsections:
632
+ subsection = ArticleSubsection(
633
+ title=subsection_outline.title,
634
+ description=subsection_outline.description,
635
+ writing_aim=["Explain " + subsection_outline.description],
636
+ support_to=[],
637
+ depend_on=[],
638
+ paragraphs=[
639
+ Paragraph(
640
+ description=f"Implementation of {subsection_outline.title}",
641
+ writing_aim=["Present key concepts", "Support main arguments"],
642
+ lines=[],
643
+ )
644
+ ],
645
+ )
646
+ section.subsections.append(subsection)
647
+
648
+ chapter.sections.append(section)
649
+
650
+ self.chapters.append(chapter)
651
+
652
+ # Generate a placeholder abstract from the outline's prospect
653
+ self.abstract = f"Abstract: {outline.prospect}"
654
+
655
+ return self
656
+
657
+
658
+ # </editor-fold>
@@ -1,19 +1,29 @@
1
1
  """This module contains the types for the keyword arguments of the methods in the models module."""
2
2
 
3
+ from importlib.util import find_spec
3
4
  from typing import Any, Required, TypedDict
4
5
 
5
6
  from litellm.caching.caching import CacheMode
6
7
  from litellm.types.caching import CachingSupportedCallTypes
7
8
 
9
+ if find_spec("pymilvus"):
10
+ from pymilvus import CollectionSchema
11
+ from pymilvus.milvus_client import IndexParams
8
12
 
9
- class CollectionSimpleConfigKwargs(TypedDict, total=False):
10
- """Configuration parameters for a vector collection.
13
+ class CollectionConfigKwargs(TypedDict, total=False):
14
+ """Configuration parameters for a vector collection.
11
15
 
12
- These arguments are typically used when configuring connections to vector databases.
13
- """
16
+ These arguments are typically used when configuring connections to vector databases.
17
+ """
14
18
 
15
- dimension: int | None
16
- timeout: float
19
+ dimension: int | None
20
+ primary_field_name: str
21
+ id_type: str
22
+ vector_field_name: str
23
+ metric_type: str
24
+ timeout: float | None
25
+ schema: CollectionSchema | None
26
+ index_params: IndexParams | None
17
27
 
18
28
 
19
29
  class FetchKwargs(TypedDict, total=False):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fabricatio
3
- Version: 0.2.6.dev6
3
+ Version: 0.2.6.dev7
4
4
  Classifier: License :: OSI Approved :: MIT License
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: 3.12
@@ -1,13 +1,13 @@
1
- fabricatio-0.2.6.dev6.dist-info/METADATA,sha256=9pqI0pxZslMJl25ehrBbGfOGeCikqwFGDVWNYwaAYXs,13693
2
- fabricatio-0.2.6.dev6.dist-info/WHEEL,sha256=7FgAcpQES0h1xhfN9Ugve9FTUilU6sRAr1WJ5ph2cuw,108
3
- fabricatio-0.2.6.dev6.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
1
+ fabricatio-0.2.6.dev7.dist-info/METADATA,sha256=uKqLHzycJi0fHhq9xKJUCiO-DzWApY-ZBPI4xUmNTek,13693
2
+ fabricatio-0.2.6.dev7.dist-info/WHEEL,sha256=7FgAcpQES0h1xhfN9Ugve9FTUilU6sRAr1WJ5ph2cuw,108
3
+ fabricatio-0.2.6.dev7.dist-info/licenses/LICENSE,sha256=yDZaTLnOi03bi3Dk6f5IjhLUc5old2yOsihHWU0z-i0,1067
4
4
  fabricatio/decorators.py,sha256=cJHsxxbnMhc4SzPl4454CPLuDP3H0qbTrzV_U2rLPrs,6372
5
5
  fabricatio/core.py,sha256=MaEKZ6DDmbdScAY-7F1gwGA6fr7ADX6Mz5rNVi2msFA,6277
6
6
  fabricatio/models/generic.py,sha256=WxT4KBGGZTpqGPSPVwD5mkmhYBjxggZ7n-HKi-Hed4M,13619
7
7
  fabricatio/models/tool.py,sha256=ATwbOyvOTzrfAKcbOmCqdG3je4-T5jrM6FIw4cDPRDY,6863
8
8
  fabricatio/models/role.py,sha256=UgIfGdfIBu4cOug8Nm1a04JCEwjXR_MDZUQhumwMptk,2710
9
- fabricatio/models/extra.py,sha256=tP58nLHlwgkM9F9EzVoDV7JP2n_1h-10uo2WRFouXuw,13448
10
- fabricatio/models/kwargs_types.py,sha256=VB_2X2cUdhD0syVl_5vPi0GU3qH5MjO7GiS44we9OO8,4468
9
+ fabricatio/models/extra.py,sha256=JXrLJWOapiu5HwkhJTtvK8bD50IImpRi19DB3HVbsQ0,25605
10
+ fabricatio/models/kwargs_types.py,sha256=rqhCG2QLj4iyZ5WnLU4IT0xPdzFWvgsz9g6qau3bD1E,4839
11
11
  fabricatio/models/utils.py,sha256=snRuH81CQfTr9GZMSV_cW0JZocwfttgsKAqFWPk_Vc8,5480
12
12
  fabricatio/models/usages.py,sha256=ovuvDab9wvn9no4_a93HVcdo8Da1kF_eOnMoqph7LcY,30145
13
13
  fabricatio/models/events.py,sha256=UvOc6V3vfjKuvh7irDezJ8EGpsNo5yzLdq4xQexVonw,4063
@@ -31,12 +31,12 @@ fabricatio/workflows/articles.py,sha256=oHNV5kNKEcOKP55FA7I1SlxQRlk6N26cpem_QYu0
31
31
  fabricatio/workflows/rag.py,sha256=uOZXprD479fUhLA6sYvEM8RWcVcUZXXtP0xRbTMPdHE,509
32
32
  fabricatio/parser.py,sha256=OV6bIAfLJ-GfaKoTeIOqS3X3GqCgyvzSJsgYMO3ogj4,6100
33
33
  fabricatio/capabilities/correct.py,sha256=BiLEAk6e1KbwUMhTexmDfgtlPUct_bG0igDK7CwHqao,5107
34
- fabricatio/capabilities/rag.py,sha256=hyQMgpFrefwMT84Huh728xsVQXNEYkUH2-98KJyfOas,15420
34
+ fabricatio/capabilities/rag.py,sha256=psRCuKo7vLJXBGrm48FsFIzrawZ2JO5OJsvH05CJ8Tg,15402
35
35
  fabricatio/capabilities/rating.py,sha256=ZQrKKmmIgnN4zgNnG_GmWa5Nyxpk03JYW32RJ4R5vvQ,14067
36
36
  fabricatio/capabilities/review.py,sha256=TX7av4b2N7MRDHMowsIZfiujXRRNxjUMNHtCFVA1UTM,10824
37
37
  fabricatio/capabilities/propose.py,sha256=4QvONVVUp1rs34Te2Rjams6NioEt6FhEAxDWiveQnSg,1544
38
38
  fabricatio/capabilities/task.py,sha256=llFFKh8MAaTjsp8DtAGD_UUONROfFNxorh6NLys973U,4496
39
39
  fabricatio/_rust.pyi,sha256=1TvnaXK_QKM8Et05LkZ_vOGR4WISVd9X8lU6OTwFFaU,3376
40
40
  fabricatio/_rust.cpython-312-x86_64-linux-gnu.so,sha256=Qv4F28dducNx2GS8L8TmMWuk3MgBivQbzH_UmC-1P2w,1911376
41
- fabricatio-0.2.6.dev6.data/scripts/tdown,sha256=h7dazHQEgymw8fXo1ROyyUfwLMMw7l4JyMlt2xJyN-4,4576688
42
- fabricatio-0.2.6.dev6.dist-info/RECORD,,
41
+ fabricatio-0.2.6.dev7.data/scripts/tdown,sha256=h7dazHQEgymw8fXo1ROyyUfwLMMw7l4JyMlt2xJyN-4,4576688
42
+ fabricatio-0.2.6.dev7.dist-info/RECORD,,