langchain_core 0.5.0 copy "langchain_core: ^0.5.0" to clipboard
langchain_core: ^0.5.0 copied to clipboard

Contains core abstractions of LangChain.dart and the LangChain Expression Language (LCEL).

0.5.0 #

Breaking: AI messages now use ordered content blocks. See the migration guide for constructor, projection, serialization, reasoning, and tool-call ID changes.

  • Make AIChatMessage.content an ordered List<AIChatMessageContentBlock> and add blocks for visible text, reasoning, media, tool calls/results, provider metadata, and non-standard provider payloads (#967).
  • Keep toolCalls as a derived getter. Tool-call IDs are now opaque provider or deterministic part IDs and must not be assumed to equal function names.
  • Make contentAsString and ChatResult.outputAsString return visible text only; reasoning remains available through reasoning blocks.
  • Serialize the canonical ordered block list while retaining support for reading legacy string/tool-call maps.
  • Merge streamed blocks only by stable provider identity or explicit stream index, preserving parallel same-name tool calls and signed part boundaries.
  • Add namespaced providerData to tool-call blocks and preserve it through serialization, equality, hashing, and streaming concatenation (#960).
  • Add AgentStep.iteration, buildToolAgentScratchpad, and ordered message-list support in MessagePlaceholder for complete parallel-tool transcripts (#970).

0.4.1 #

0.4.0+1 #

0.4.0 #

Note: This release has breaking changes.

0.3.9 #

  • Update a dependency to the latest release.

0.3.8 #

  • FEAT: Make CreateChatCompletionStreamResponse.choices field nullable to support Groq's OpenAI-compatible API (#742). (76fbbdc6)
  • FIX: Add multi-LLM compatibility for Tool.fromFunction getInputFromJson (#738). (291a0efc)
  • BUILD: Update dependencies (#751). (250a3c6)

0.3.7 #

  • FEAT: Update dependencies (requires Dart 3.6.0) (#709). (9e3467f7)
  • FEAT: Add to/fromMap serialization to ChatMessage, PromptValue & ChatHistory (#681). (d239c7c7)
  • FIX: Fix linter issues (#656). (88a79c65)
  • FIX: RunnableMap doesn't invoke multiple Runnables in parallel (#649). (fc722d85)

0.3.6+1 #

  • REFACTOR: Add new lint rules and fix issues (#621). (60b10e00)

0.3.6 #

0.3.5 #

  • FEAT: Add copyWith method to all RunnableOptions subclasses (#531). (42c8d480)
  • FEAT: Support OpenAI's strict mode for tool calling in ChatOpenAI (#536). (71623f49)
  • FEAT: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532). (68d8011a)

0.3.4 #

  • FEAT: Add Fallback support for Runnables (#501). (5887858d)
  • FEAT: Implement additive options merging for cascade bind calls (#500). (8691eb21)
  • REFACTOR: Remove default model from the language model options (#498). (44363e43)

0.3.3 #

  • FEAT: Add support for ChatToolChoiceRequired (#474). (bf324f36)
  • FEAT: Update ChatResult.id concat logic (#477). (44c7fafd)

0.3.2 #

  • REFACTOR: Migrate to langchaindart.dev domain (#434). (358f79d6)
  • FIX: Stream errors are not propagated by StringOutputParser (#440). (496b11cc)
  • FEAT: Add Runnable.close() to close any resources associated with it (#439). (4e08cced)

0.3.1 #

0.3.0 #

Note: This release has breaking changes.
If you are using "function calling" check how to migrate to "tool calling".

  • BREAKING FEAT: Migrate from function calling to tool calling (#400). (44413b83)
  • BREAKING REFACTOR: Improve Tool abstractions (#398). (2a50aec2)

0.2.0+1 #

  • FIX: Allow async functions in Runnable.mapInput (#396). (e4c35092)

0.2.0 #

Note: This release has breaking changes.
If you are using Runnable.fromFunction check the migration guide.

  • FEAT Add support for RunnableRouter (#386). (827e262)
  • FEAT: Add support for Runnable.mapInputStream (#393). (a2b6bbb5)
  • FEAT: Add support for JsonOutputParser (#392). (c6508f0f)
  • FEAT: Reduce input stream for PromptTemplate, LLM, ChatModel, Retriever and Tool (#388). (b59bcd40)
  • BREAKING FEAT: Support different logic for streaming in RunnableFunction (#394). (8bb2b8ed)

0.1.0 #

Note: This release has breaking changes.
Migration guide

  • BREAKING REFACTOR: Introduce langchain_core and langchain_community packages (#328). (5fa520e6)
  • BREAKING REFACTOR: Simplify LLMResult and ChatResult classes (#363). (ffe539c1)
  • BREAKING REFACTOR: Simplify Output Parsers (#367). (f24b7058)
  • REFACTOR: Simplify internal .stream implementation (#364). (c83fed22)
  • FEAT: Implement .batch support (#370). (d254f929)
  • FEAT: Add reduceOutputStream option to StringOutputParser (#368). (7f9a9fae)

0.0.1-dev.2 #

  • FEAT: Update meta and test dependencies (#331). (912370ee)

0.0.1-dev.1 #

  • Bootstrap package.
10
likes
160
points
2.16k
downloads

Documentation

Documentation
API reference

Publisher

verified publisherlangchaindart.dev

Weekly Downloads

Contains core abstractions of LangChain.dart and the LangChain Expression Language (LCEL).

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#nlp #gen-ai #llms #langchain

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

async, collection, cross_file, crypto, meta, rxdart

More

Packages that depend on langchain_core