Added
Document.from_docling()supports calendar files (iCalendar,.ics), which Docling reads from 2.148.0: the calendar is the title, and each event or to-do is a heading with its times, place, organizer, status and description as paragraphs, and its attendees and reminders as lists.
Changed
- Upgraded pinned dependency versions:
litellm==1.108.8,openai==3.51.0,genai-prices==0.2.3. ContextGem now requires openai 3: code of your own that uses the OpenAI SDK in the same environment must work with it. Thislitellmno longer holds installs onfilelock3, whose known vulnerabilities are fixed infilelock4. - Decision models of Azure OpenAI (
azure/<deployment_name>), Fireworks AI, Databricks, Bespoke and Laya are supported, which thislitellmserves through its Decisions API (see "Supported Providers and Models" of the decision models page). - In a stand-in for
litellm.acompletionin your tests, mock the refusal of an OpenAI model withrefusalon the message, instead ofprovider_specific_fields={"refusal": ...}: thislitellmkeeps the refusal field of OpenAI there, where ContextGem now reads it. - The
doclingextra now requires Docling 2.148.0 or later, which reads calendar files, and docling-core 2.106.0 or later, whose formatted text keeps the whitespace between its parts. Document.from_docling()gives the state of a checkbox as Markdown does, with a box before its text:[x] Express delivery,I agree to the terms: [x]andOptions: [x] Tea [ ] Coffee, instead ofcheckedanduncheckedafter it. The additional context of the paragraph of a checkbox isCheckbox, without its state. A checkbox in a line of formatted text, which lost its state, now has its box too.
Fixed
Document.from_docling()joins the parts of formatted text as Docling gives them, with their own whitespace, e.g. a word with a subscript or a superscript in it, which got a space inside it:H2Oandx2instead ofH 2 Oandx 2. A Docling document saved with Docling before 2.147.0 has a space between all the parts of its formatted text, also before punctuation, e.g.Ltd .: convert the file again with a current Docling. Formatted text of Docling's VLM pipeline, from DocTags, has no whitespace between its parts, so the words around a formatted part run together (see "What the Document Is Made Of" of the Docling page).Document.from_docling()keeps all the text of a form field, as a DocLang file can have it: a key or a value with formatted text, e.g. a word in bold or a link, the state of a checkbox in it, and a form field inside the value of another one, which becomes a paragraph of its own after it. Such text was left out, e.g.I agree to the termsinstead ofI agree to the terms: [x], and a field whose key and value were both formatted had no paragraph.