github shcherbak-ai/contextgem v1.7.0

one hour ago

Added

  • DocumentLLM(strict_structured_output=True) sends the JSON schema of each extraction of aspects and concepts as a strict response format, so that the provider returns JSON that matches it. It is off by default, and needs a model whose provider supports strict JSON schemas. ContextGem still checks each answer, and never drops the schema from a request: with it, a request raises ValueError while litellm.drop_params is True. JSON object concepts with arbitrary keys, e.g. dict[str, str], cannot be extracted with it. See "Strict Structured Output" in the documentation.
  • Decision models of Ollama and LM Studio can be used with the prefixes of their LLMs, ollama/ or ollama_chat/ and lm_studio/, e.g. ollama/nimble. strands_decider/ still works. With ollama/ and ollama_chat/, if Ollama is not at its default address, set OLLAMA_API_BASE to its address too (see "Local Decision Models" of the decision models page).
  • Decision models of Parallel (parallel_ai/), Nace (nace/), EU Jev (eu_jev/) and EmpirioLabs (empiriolabs/) are supported (see "Supported Providers and Models" of the decision models page).

Changed

  • Upgraded pinned dependency versions: litellm==1.110.3, openai==3.58.0, genai-prices==0.2.5.
  • An answer of a decision model without the probability of an option offered is now an invalid response, which is retried (max_retries_invalid_data): this litellm no longer fills in a missing probability with zero.
  • The message of ModelExtractionError for a decision model now also names the model, the aspect or concept, and what is wrong with the response, e.g. the options without a probability, which was only logged.
  • The error on auto_pricing=True for a local or self-hosted model now names the model, and the error on the identifier of a decision model without a provider or a model name links to the providers of decision models.

Don't miss a new contextgem release

NewReleases is sending notifications on new releases.