Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Firestore): Add support for FirestoreChatMessageHistory (#60) #171

Open
wants to merge 252 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
ae04827
fix overrides
KennethKnudsen97 May 2, 2024
a45201b
impl tojson
KennethKnudsen97 May 3, 2024
ca2e27f
Add createdby field
KennethKnudsen97 May 3, 2024
279cbbe
Remove userId from firestoreChatMessageField
KennethKnudsen97 May 4, 2024
a30d109
Create example
KennethKnudsen97 May 4, 2024
e5c11ff
Renaming some examples
KennethKnudsen97 May 4, 2024
643d537
Merge remote-tracking branch 'upstream/main'
KennethKnudsen97 May 19, 2024
a30b410
migrate functioncall to toolcall
KennethKnudsen97 May 19, 2024
1fada51
move firstoreChatMessageHistory to langchain_firebase
KennethKnudsen97 May 19, 2024
7bab052
Make user handle firebase app initialize
KennethKnudsen97 May 19, 2024
85a2580
Inserted missing json object for AiChatMessage and ToolCall
KennethKnudsen97 May 19, 2024
2a6f379
build(deps): bump actions/checkout from 4.1.5 to 4.1.6 (#427)
dependabot[bot] May 20, 2024
ccb03a2
fix: Make quote nullable in MessageContentTextAnnotationsFileCitation…
davidmigloz May 20, 2024
4f9cd7c
fix: Rename CreateRunRequestModel factories names (#429)
davidmigloz May 20, 2024
6977406
fix: digest path param in Ollama blob endpoints (#430)
davidmigloz May 20, 2024
4de9cfd
docs: Fix lint issues in langchain_firebase example
davidmigloz May 20, 2024
001dc5c
chore(release): publish packages
davidmigloz May 20, 2024
0091fc1
test: Fix ollama_dart tests
davidmigloz May 21, 2024
a89f89a
feat: Implement anthropic_sdk_dart, a Dart client for Anthropic API (…
alfredobs97 May 23, 2024
9b55b80
refactor: Migrate to langchaindart.dev domain (#434)
davidmigloz May 24, 2024
8ccbe38
fix: Fix deserialization of sealed classes (#435)
davidmigloz May 25, 2024
8ac0e94
fix: Make vector store name optional in openai_dart (#436)
davidmigloz May 25, 2024
50e69e0
docs: Document tool calling with OpenRouter (#437)
davidmigloz May 25, 2024
23d63ce
feat: Add support for ObjectBoxVectorStore (#438)
davidmigloz May 28, 2024
554b1c6
feat: Add Runnable.close() to close any resources associated with it …
davidmigloz May 28, 2024
b12a343
fix: Stream errors are not propagated by StringOutputParser (#440)
davidmigloz May 28, 2024
d827d2f
docs: Update hello_world_flutter example with Ollama, GoogleAI and Mi…
davidmigloz May 28, 2024
edccc1a
refactor: Reformat OpenAI OpenAPI specs (#443)
davidmigloz May 29, 2024
f1109fc
feat: Support FastChat OpenAI-compatible API (#444)
davidmigloz May 29, 2024
16a335d
feat: Support buffered stream responses in ollama_dart (#445)
davidmigloz May 29, 2024
43005ec
docs: Add WikivoyageEU example, a fully local RAG with Llama3 and Obj…
davidmigloz May 31, 2024
28d1561
docs: Update README.md
davidmigloz May 31, 2024
7971ec4
chore(release): publish packages
davidmigloz May 31, 2024
32d56da
fix: Add missing dependency in langchain_community package (#448)
davidmigloz May 31, 2024
6d90562
chore(release): publish packages
davidmigloz May 31, 2024
423e79c
docs: Update ObjectBox docs
davidmigloz Jun 1, 2024
360ab66
refactor: Migrate conditional imports to js_interop (#453)
davidmigloz Jun 10, 2024
5668fda
feat: Bootstrap `langgraph` package (#454)
davidmigloz Jun 13, 2024
45b1a22
feat: Add support for listing running Ollama models (#451)
HavenDV Jun 13, 2024
abbc724
feat: Bootstrap `tavily_dart` package (#455)
davidmigloz Jun 14, 2024
65613e7
feat: Implement tavily_dart, a Dart client for Tavily API (#456)
davidmigloz Jun 14, 2024
d7dac3d
feat: Add support for usage metadata in ChatFirebaseVertexAI (#457)
davidmigloz Jun 15, 2024
cad03c5
feat!: Update ChatFirebaseVertexAI default model to gemini-1.5-flash…
davidmigloz Jun 15, 2024
4ce7310
refactor: Simplify how tools are passed to the internal Firebase clie…
davidmigloz Jun 15, 2024
348a58b
feat: Add support for Firebase Auth in ChatFirebaseVertexAI (#460)
davidmigloz Jun 15, 2024
cae46db
feat: Support response MIME type and schema in ChatGoogleGenerativeAI…
davidmigloz Jun 15, 2024
214e8ba
feat!: Update ChatGoogleGenerativeAI default model to gemini-1.5-fla…
davidmigloz Jun 15, 2024
cf7559e
feat: Support response MIME type in ChatFirebaseVertexAI (#461) (#463)
davidmigloz Jun 15, 2024
cec8230
build(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#464)
dependabot[bot] Jun 17, 2024
37bf565
feat: Add support for TavilySearchResultsTool and TavilyAnswerTool (#…
davidmigloz Jun 20, 2024
937cec0
feat: Add support for tool use in anthropic_sdk_dart client (#469)
davidmigloz Jun 22, 2024
45e7769
build(deps): bump melos from 6.0.0 to 6.1.0 (#470)
dependabot[bot] Jun 24, 2024
5473a17
feat: Add support for ChatToolChoiceRequired (#474)
davidmigloz Jun 27, 2024
82d104c
refactor: Improve schemas names in anthropic_sdk_dart (#475)
davidmigloz Jun 27, 2024
c257b8a
feat: Add extensions on ToolResultBlockContent in anthropic_sdk_dart …
davidmigloz Jul 2, 2024
59f2340
feat: Add ChatAnthropic integration (#477)
davidmigloz Jul 2, 2024
b581d7c
docs: Update README.md
davidmigloz Jul 2, 2024
d8973d4
chore(release): publish packages
davidmigloz Jul 2, 2024
ae5926c
docs: Update Ollama request options default values in API docs (#479)
davidmigloz Jul 5, 2024
85f610f
refactor: Depend on exact versions for internal 1st party dependencie…
davidmigloz Jul 10, 2024
cb382c5
build: Expand collection package version constraints to 1.20.0 (#485)
davidmigloz Jul 10, 2024
69b6640
feat: Add support for ChatOllamaTools (#288)
Ganeshsivakumar Jul 11, 2024
079b02a
docs: Update README.md
davidmigloz Jul 11, 2024
be1cf3c
feat: Add support for Ollama version and model info (#488)
HavenDV Jul 12, 2024
4f17878
refactor!: Change Ollama push model status type from enum to String (…
davidmigloz Jul 12, 2024
3412c4c
feat: Add support for overrides in the file search tool in openai_dar…
davidmigloz Jul 18, 2024
e20ba18
feat: Add support for disabling parallel tool calls in openai_dart (#…
davidmigloz Jul 18, 2024
89b06b8
feat: Add support for disabling parallel tool calls in ChatOpenAI (#493)
davidmigloz Jul 18, 2024
94bdd3a
feat: Add support for service tier in openai_dart (#494)
davidmigloz Jul 18, 2024
309b3b0
feat: Add support for service tier in ChatOpenAI (#495)
davidmigloz Jul 20, 2024
28f6a5c
feat: Support chunking strategy in file_search tool in openai_dart (#…
davidmigloz Jul 20, 2024
f6136c7
feat: Add GPT-4o-mini to model catalog (#497)
davidmigloz Jul 20, 2024
1b67923
refactor: Remove default model from the language model options (#498)
davidmigloz Jul 20, 2024
ac94b22
feat: Implement additive options merging for cascade bind calls (#500)
davidmigloz Jul 20, 2024
8b8c48f
feat: Allow to customize OpenAI-Beta header in openai_dart (#502)
davidmigloz Jul 23, 2024
2e97d1f
feat: Add Fallback support for Runnables (#501)
Ganeshsivakumar Jul 24, 2024
a28f9af
feat: Add suffix support in Ollama completions API in ollama_dart (#503)
davidmigloz Jul 24, 2024
a2ea62f
feat: Add tool calling support in ollama_dart (#504)
davidmigloz Jul 24, 2024
c7910de
feat: Add tool calling support in ChatOllama (#505)
davidmigloz Jul 24, 2024
64c844a
feat!: Update Ollama default model to llama-3.1 (#506)
davidmigloz Jul 25, 2024
b47a439
feat!: Update ChatOpenAI default model to gpt-4o-mini (#507)
davidmigloz Jul 26, 2024
037071b
docs: Update Ollama documentation (#508)
davidmigloz Jul 26, 2024
7dee2e7
refactor: Remove ChatOllamaTools in favour of ChatOllama (#509)
davidmigloz Jul 26, 2024
ea9a693
chore(release): publish packages
davidmigloz Jul 26, 2024
30cc964
docs: Fix typo in langchain_ollama readme
davidmigloz Jul 26, 2024
4065aa7
refactor: Don't send OpenAI-Beta header in ChatOpenAI (#511)
davidmigloz Jul 29, 2024
a32b48b
feat: Add support for min_p in Ollama (#512)
davidmigloz Jul 29, 2024
fca99fc
build: Update dependencies (#520)
davidmigloz Aug 10, 2024
81aadfa
docs: Suggest using few-shot prompting with Ollama tool calling (#521)
davidmigloz Aug 10, 2024
53aaa43
feat: Add gpt-4o-2024-08-06 to model catalog in openai_dart (#522)
davidmigloz Aug 10, 2024
f73aef7
build: Upgrade pubspec.lock files (#523)
davidmigloz Aug 16, 2024
1f1f592
feat: Add support for Structured Outputs in openai_dart (#525)
davidmigloz Aug 17, 2024
ef42d5a
feat: Add support for Structured Outputs in ChatOpenAI (#526)
davidmigloz Aug 17, 2024
6d5e3db
feat: Add chatgpt-4o-latest to model catalog (#527)
davidmigloz Aug 17, 2024
2156fa3
feat: Add copyWith method to all RunnableOptions subclasses (#531)
davidmigloz Aug 21, 2024
d9661a5
feat: Add ToolsAgent for models with tool-calling support (#530)
Heinrich-vanNieuwenhuizen Aug 21, 2024
d338981
feat: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532)
davidmigloz Aug 21, 2024
c423b66
feat: Handle refusal in OpenAI's Structured Outputs API (#533)
davidmigloz Aug 21, 2024
bb2fc0a
feat: Add log probabilities for refusal tokens in openai_dart (#534)
davidmigloz Aug 21, 2024
e15e411
feat: Include logprobs in result metadata from ChatOpenAI (#535)
davidmigloz Aug 21, 2024
035a041
feat: Support OpenAI's strict mode for tool calling in ChatOpenAI (#536)
davidmigloz Aug 21, 2024
a9d33ec
build: Update analysis_options.yaml and fix linter issues (#537)
davidmigloz Aug 22, 2024
910aec1
docs: Add Code Assist AI in README and documentation (#538)
davidmigloz Aug 22, 2024
3739397
test: Update model used in OpenAI tests to gpt-4o-mini (#539)
davidmigloz Aug 22, 2024
ee4a1c8
chore(release): publish packages
davidmigloz Aug 22, 2024
18d6c5a
build: Update pubspec.lock files
davidmigloz Aug 22, 2024
f542a03
build(deps): bump bluefireteam/melos-action (#541)
dependabot[bot] Aug 26, 2024
b5d16e4
feat: Add retry support for Runnables (#540)
Ganeshsivakumar Aug 26, 2024
d1cca22
feat: Option to include file search results in assistants API (#543)
davidmigloz Aug 28, 2024
5df8554
feat: Add support for reduced output dimensionality in GoogleGenerati…
davidmigloz Aug 31, 2024
5cdddb2
docs: Update READMEs (#545)
davidmigloz Sep 6, 2024
67b3d75
build: Update gcloud and googleapis dependencies (#546)
davidmigloz Sep 6, 2024
72a8faa
docs: Bootstrap docusaurus docs (#548)
davidmigloz Sep 20, 2024
6f55767
build(deps): bump the npm_and_yarn group across 1 directory with 7 up…
dependabot[bot] Sep 20, 2024
8642c64
build(deps): bump bluefireteam/melos-action (#549)
dependabot[bot] Sep 23, 2024
887a2d1
docs: Update Google's models in documentation (#551)
davidmigloz Sep 25, 2024
71143ff
feat: Add support for deleteWhere in ObjectBoxVectorStore (#552)
davidmigloz Sep 25, 2024
6a378c8
refactor: Add stubs for ObjectBox on web platform (#553)
davidmigloz Sep 25, 2024
28c9486
feat: Update Ollama default model to llama-3.2 (#554)
davidmigloz Sep 25, 2024
0a582d0
feat: Add OpenAI o1-preview and o1-mini to model catalog (#555)
davidmigloz Sep 25, 2024
4c3e83c
feat: Add support for maxCompletionTokens and reasoningTokens in open…
davidmigloz Sep 25, 2024
9650964
refactor: Migrate ChatOpenAI to maxCompletionTokens (#557)
davidmigloz Sep 25, 2024
9464af2
chore(release): publish packages
davidmigloz Sep 25, 2024
f0b4118
build: Update pubspec.lock files
davidmigloz Sep 25, 2024
4690588
docs: Update README.md
davidmigloz Sep 25, 2024
62f042a
chore(release): publish packages
davidmigloz Sep 25, 2024
36c28f6
refactor: Update deprecated UUID constant (#558)
davidmigloz Sep 25, 2024
4dccc2b
build(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#559)
dependabot[bot] Sep 30, 2024
8b81bea
soft-reset to upstream main
KennethKnudsen97 Oct 1, 2024
031cb30
build(deps): bump actions/checkout from 4.1.5 to 4.1.6 (#427)
dependabot[bot] May 20, 2024
7e77ae3
fix: Make quote nullable in MessageContentTextAnnotationsFileCitation…
davidmigloz May 20, 2024
2e42b8c
fix: Rename CreateRunRequestModel factories names (#429)
davidmigloz May 20, 2024
092b955
fix: digest path param in Ollama blob endpoints (#430)
davidmigloz May 20, 2024
2448029
docs: Fix lint issues in langchain_firebase example
davidmigloz May 20, 2024
7a5e69f
chore(release): publish packages
davidmigloz May 20, 2024
bb05c6a
test: Fix ollama_dart tests
davidmigloz May 21, 2024
720a445
feat: Implement anthropic_sdk_dart, a Dart client for Anthropic API (…
alfredobs97 May 23, 2024
d4009e8
refactor: Migrate to langchaindart.dev domain (#434)
davidmigloz May 24, 2024
1994c64
fix: Fix deserialization of sealed classes (#435)
davidmigloz May 25, 2024
fad68ec
fix: Make vector store name optional in openai_dart (#436)
davidmigloz May 25, 2024
7fd9038
docs: Document tool calling with OpenRouter (#437)
davidmigloz May 25, 2024
e1dae79
feat: Add support for ObjectBoxVectorStore (#438)
davidmigloz May 28, 2024
541e65d
feat: Add Runnable.close() to close any resources associated with it …
davidmigloz May 28, 2024
5c76dbf
fix: Stream errors are not propagated by StringOutputParser (#440)
davidmigloz May 28, 2024
899eac8
docs: Update hello_world_flutter example with Ollama, GoogleAI and Mi…
davidmigloz May 28, 2024
186ece5
refactor: Reformat OpenAI OpenAPI specs (#443)
davidmigloz May 29, 2024
72a87d1
feat: Support FastChat OpenAI-compatible API (#444)
davidmigloz May 29, 2024
c9ac183
feat: Support buffered stream responses in ollama_dart (#445)
davidmigloz May 29, 2024
592060c
docs: Add WikivoyageEU example, a fully local RAG with Llama3 and Obj…
davidmigloz May 31, 2024
2598307
docs: Update README.md
davidmigloz May 31, 2024
22f4c38
chore(release): publish packages
davidmigloz May 31, 2024
4c44730
fix: Add missing dependency in langchain_community package (#448)
davidmigloz May 31, 2024
fae833b
chore(release): publish packages
davidmigloz May 31, 2024
b3d8b1a
docs: Update ObjectBox docs
davidmigloz Jun 1, 2024
084e9b6
refactor: Migrate conditional imports to js_interop (#453)
davidmigloz Jun 10, 2024
a6b58f1
feat: Bootstrap `langgraph` package (#454)
davidmigloz Jun 13, 2024
6149566
feat: Add support for listing running Ollama models (#451)
HavenDV Jun 13, 2024
8c90237
feat: Bootstrap `tavily_dart` package (#455)
davidmigloz Jun 14, 2024
6681569
feat: Implement tavily_dart, a Dart client for Tavily API (#456)
davidmigloz Jun 14, 2024
ed4c28e
feat: Add support for usage metadata in ChatFirebaseVertexAI (#457)
davidmigloz Jun 15, 2024
c0d291e
feat!: Update ChatFirebaseVertexAI default model to gemini-1.5-flash…
davidmigloz Jun 15, 2024
1f7effc
refactor: Simplify how tools are passed to the internal Firebase clie…
davidmigloz Jun 15, 2024
0328bf4
feat: Add support for Firebase Auth in ChatFirebaseVertexAI (#460)
davidmigloz Jun 15, 2024
f4175f7
feat: Support response MIME type and schema in ChatGoogleGenerativeAI…
davidmigloz Jun 15, 2024
5528318
feat!: Update ChatGoogleGenerativeAI default model to gemini-1.5-fla…
davidmigloz Jun 15, 2024
d0874fd
feat: Support response MIME type in ChatFirebaseVertexAI (#461) (#463)
davidmigloz Jun 15, 2024
4558dd4
build(deps): bump actions/checkout from 4.1.6 to 4.1.7 (#464)
dependabot[bot] Jun 17, 2024
c8b7ad1
feat: Add support for TavilySearchResultsTool and TavilyAnswerTool (#…
davidmigloz Jun 20, 2024
510abf9
feat: Add support for tool use in anthropic_sdk_dart client (#469)
davidmigloz Jun 22, 2024
f03015a
build(deps): bump melos from 6.0.0 to 6.1.0 (#470)
dependabot[bot] Jun 24, 2024
02d84ae
feat: Add support for ChatToolChoiceRequired (#474)
davidmigloz Jun 27, 2024
d93f7f0
refactor: Improve schemas names in anthropic_sdk_dart (#475)
davidmigloz Jun 27, 2024
2838d91
feat: Add extensions on ToolResultBlockContent in anthropic_sdk_dart …
davidmigloz Jul 2, 2024
1d38aa4
feat: Add ChatAnthropic integration (#477)
davidmigloz Jul 2, 2024
2531966
docs: Update README.md
davidmigloz Jul 2, 2024
fe969dd
chore(release): publish packages
davidmigloz Jul 2, 2024
c1ed764
docs: Update Ollama request options default values in API docs (#479)
davidmigloz Jul 5, 2024
f9db506
refactor: Depend on exact versions for internal 1st party dependencie…
davidmigloz Jul 10, 2024
757cbac
build: Expand collection package version constraints to 1.20.0 (#485)
davidmigloz Jul 10, 2024
59a2d5f
feat: Add support for ChatOllamaTools (#288)
Ganeshsivakumar Jul 11, 2024
8f78e7c
docs: Update README.md
davidmigloz Jul 11, 2024
5b75bb5
feat: Add support for Ollama version and model info (#488)
HavenDV Jul 12, 2024
76a6e55
refactor!: Change Ollama push model status type from enum to String (…
davidmigloz Jul 12, 2024
5ee5658
feat: Add support for overrides in the file search tool in openai_dar…
davidmigloz Jul 18, 2024
de565aa
feat: Add support for disabling parallel tool calls in openai_dart (#…
davidmigloz Jul 18, 2024
fe84987
feat: Add support for disabling parallel tool calls in ChatOpenAI (#493)
davidmigloz Jul 18, 2024
6551501
feat: Add support for service tier in openai_dart (#494)
davidmigloz Jul 18, 2024
3bc788d
feat: Add support for service tier in ChatOpenAI (#495)
davidmigloz Jul 20, 2024
31106fe
feat: Support chunking strategy in file_search tool in openai_dart (#…
davidmigloz Jul 20, 2024
a640089
feat: Add GPT-4o-mini to model catalog (#497)
davidmigloz Jul 20, 2024
8846e02
refactor: Remove default model from the language model options (#498)
davidmigloz Jul 20, 2024
52e5b00
feat: Implement additive options merging for cascade bind calls (#500)
davidmigloz Jul 20, 2024
3a7e15d
feat: Allow to customize OpenAI-Beta header in openai_dart (#502)
davidmigloz Jul 23, 2024
57aed0c
feat: Add Fallback support for Runnables (#501)
Ganeshsivakumar Jul 24, 2024
1a7b48c
feat: Add suffix support in Ollama completions API in ollama_dart (#503)
davidmigloz Jul 24, 2024
448577c
feat: Add tool calling support in ollama_dart (#504)
davidmigloz Jul 24, 2024
117d4ab
feat: Add tool calling support in ChatOllama (#505)
davidmigloz Jul 24, 2024
9ed482f
feat!: Update Ollama default model to llama-3.1 (#506)
davidmigloz Jul 25, 2024
217ef62
feat!: Update ChatOpenAI default model to gpt-4o-mini (#507)
davidmigloz Jul 26, 2024
b7b2552
docs: Update Ollama documentation (#508)
davidmigloz Jul 26, 2024
c745b4f
refactor: Remove ChatOllamaTools in favour of ChatOllama (#509)
davidmigloz Jul 26, 2024
4a60d8c
chore(release): publish packages
davidmigloz Jul 26, 2024
e377ed2
docs: Fix typo in langchain_ollama readme
davidmigloz Jul 26, 2024
64eca28
refactor: Don't send OpenAI-Beta header in ChatOpenAI (#511)
davidmigloz Jul 29, 2024
eb3f7f5
feat: Add support for min_p in Ollama (#512)
davidmigloz Jul 29, 2024
1c9d878
build: Update dependencies (#520)
davidmigloz Aug 10, 2024
6b5afee
docs: Suggest using few-shot prompting with Ollama tool calling (#521)
davidmigloz Aug 10, 2024
0815082
feat: Add gpt-4o-2024-08-06 to model catalog in openai_dart (#522)
davidmigloz Aug 10, 2024
7205932
build: Upgrade pubspec.lock files (#523)
davidmigloz Aug 16, 2024
5542577
feat: Add support for Structured Outputs in openai_dart (#525)
davidmigloz Aug 17, 2024
97322e9
feat: Add support for Structured Outputs in ChatOpenAI (#526)
davidmigloz Aug 17, 2024
2f6dbde
feat: Add chatgpt-4o-latest to model catalog (#527)
davidmigloz Aug 17, 2024
bcba078
feat: Add copyWith method to all RunnableOptions subclasses (#531)
davidmigloz Aug 21, 2024
989b3f1
feat: Add ToolsAgent for models with tool-calling support (#530)
Heinrich-vanNieuwenhuizen Aug 21, 2024
7be6bfe
feat: Deprecate OpenAIToolsAgent in favour of ToolsAgent (#532)
davidmigloz Aug 21, 2024
335bdaa
feat: Handle refusal in OpenAI's Structured Outputs API (#533)
davidmigloz Aug 21, 2024
7cc1966
feat: Add log probabilities for refusal tokens in openai_dart (#534)
davidmigloz Aug 21, 2024
186c258
feat: Include logprobs in result metadata from ChatOpenAI (#535)
davidmigloz Aug 21, 2024
68964d4
feat: Support OpenAI's strict mode for tool calling in ChatOpenAI (#536)
davidmigloz Aug 21, 2024
4959d71
build: Update analysis_options.yaml and fix linter issues (#537)
davidmigloz Aug 22, 2024
c16d013
docs: Add Code Assist AI in README and documentation (#538)
davidmigloz Aug 22, 2024
7529166
test: Update model used in OpenAI tests to gpt-4o-mini (#539)
davidmigloz Aug 22, 2024
248596e
chore(release): publish packages
davidmigloz Aug 22, 2024
ab9d98d
build: Update pubspec.lock files
davidmigloz Aug 22, 2024
3f7cfdc
build(deps): bump bluefireteam/melos-action (#541)
dependabot[bot] Aug 26, 2024
a2007f8
feat: Add retry support for Runnables (#540)
Ganeshsivakumar Aug 26, 2024
274c7cb
feat: Option to include file search results in assistants API (#543)
davidmigloz Aug 28, 2024
fe82d1d
feat: Add support for reduced output dimensionality in GoogleGenerati…
davidmigloz Aug 31, 2024
a4cda89
docs: Update READMEs (#545)
davidmigloz Sep 6, 2024
395dbfc
build: Update gcloud and googleapis dependencies (#546)
davidmigloz Sep 6, 2024
5edd126
docs: Bootstrap docusaurus docs (#548)
davidmigloz Sep 20, 2024
4001ef9
build(deps): bump the npm_and_yarn group across 1 directory with 7 up…
dependabot[bot] Sep 20, 2024
511f1b7
build(deps): bump bluefireteam/melos-action (#549)
dependabot[bot] Sep 23, 2024
c1b2d1d
docs: Update Google's models in documentation (#551)
davidmigloz Sep 25, 2024
edfb728
feat: Add support for deleteWhere in ObjectBoxVectorStore (#552)
davidmigloz Sep 25, 2024
4fc0e7a
refactor: Add stubs for ObjectBox on web platform (#553)
davidmigloz Sep 25, 2024
364842c
feat: Update Ollama default model to llama-3.2 (#554)
davidmigloz Sep 25, 2024
8ffbe8c
feat: Add OpenAI o1-preview and o1-mini to model catalog (#555)
davidmigloz Sep 25, 2024
0d0997b
feat: Add support for maxCompletionTokens and reasoningTokens in open…
davidmigloz Sep 25, 2024
ccf34f7
refactor: Migrate ChatOpenAI to maxCompletionTokens (#557)
davidmigloz Sep 25, 2024
d762f55
chore(release): publish packages
davidmigloz Sep 25, 2024
7504e27
build: Update pubspec.lock files
davidmigloz Sep 25, 2024
9782969
docs: Update README.md
davidmigloz Sep 25, 2024
94e730d
chore(release): publish packages
davidmigloz Sep 25, 2024
e236025
refactor: Update deprecated UUID constant (#558)
davidmigloz Sep 25, 2024
a7bcd8f
build(deps): bump actions/checkout from 4.1.7 to 4.2.0 (#559)
dependabot[bot] Sep 30, 2024
ce95ceb
fixed dependency errors
KennethKnudsen97 Oct 1, 2024
590b86d
fix uuid namespace pass as string
KennethKnudsen97 Oct 1, 2024
50e6237
langchain dep error
KennethKnudsen97 Oct 1, 2024
85b2c6e
lock update
KennethKnudsen97 Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy docs_v2

on:
push:
branches:
- main

jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- run: npm ci && npm run build
working-directory: docs_v2
- uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_LANGCHAIN_DART }}
channelId: live
projectId: langchain-dart
entryPoint: docs_v2
26 changes: 26 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy docs_v2 on PR

on:
pull_request:
paths:
- 'docs_v2/**'

permissions:
checks: write
contents: read
pull-requests: write

jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
- run: npm ci && npm run build
working-directory: docs_v2
- uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_LANGCHAIN_DART }}
projectId: langchain-dart
entryPoint: docs_v2
7 changes: 5 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
# pull_request_target is dangerous! Review external PRs code before approving to run the workflow
# We need this to be able to access the secrets required by the workflow
pull_request_target:
paths-ignore:
- 'docs/**'
- 'docs_v2/**'
workflow_dispatch:

# Cancel currently running workflow when a new one is triggered
Expand All @@ -19,7 +22,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
with:
ref: "${{ github.event.pull_request.base.sha }}" # Required for pull_request_target
fetch-depth: 0
Expand All @@ -38,7 +41,7 @@ jobs:
run: flutter pub cache clean

- name: Install Melos
uses: bluefireteam/melos-action@6085791af7036f6366c9a4b9d55105c0ef9c6388
uses: bluefireteam/melos-action@c7dcb921b23cc520cace360b95d02b37bf09cdaa
with:
run-bootstrap: false

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.dart_tool/
/pubspec.lock
.vscode/
.aider*
536 changes: 527 additions & 9 deletions CHANGELOG.md

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ analyzer:
missing_return: error
todo: ignore
sdk_version_since: ignore # TODO remove when fixed https://github.com/dart-lang/sdk/issues/52327
exclude:
- "**/generated_plugin_registrant.dart"
- "**/generated/**"
- "**/*.gen.dart"
- "**/*.g.dart"

linter:
rules: # https://dart-lang.github.io/linter/lints/{rule}.html
Expand All @@ -30,7 +35,7 @@ linter:
- avoid_null_checks_in_equality_operators
- avoid_positional_boolean_parameters
- avoid_print
# - avoid_redundant_argument_values # Sometimes is useful to be explicit
# - avoid_redundant_argument_values # I prefer to be explicit sometimes
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
Expand Down Expand Up @@ -65,6 +70,7 @@ linter:
# - diagnostic_describe_all_properties # Disabled because it's very verbose
- directives_ordering
- discarded_futures
# - document_ignores # Disabled because it's very verbose
- empty_catches
- empty_constructor_bodies
- empty_statements
Expand All @@ -76,6 +82,7 @@ linter:
- implementation_imports
- implicit_call_tearoffs
- invalid_case_patterns
- invalid_runtime_check_with_js_interop_types
- iterable_contains_unrelated_type
- join_return_with_assignment
- leading_newlines_in_multiline_strings
Expand All @@ -85,6 +92,7 @@ linter:
- library_private_types_in_public_api
- list_remove_unrelated_type
- matching_super_parameters
- missing_code_block_language_in_doc_comment
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_default_cases
Expand All @@ -94,6 +102,7 @@ linter:
- no_literal_bool_comparisons
- no_logic_in_create_state
- no_runtimeType_toString
- no_wildcard_variable_uses
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
Expand All @@ -116,7 +125,7 @@ linter:
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
# - prefer_final_parameters # adds too much verbosity
# - prefer_final_parameters # Very verbose
- prefer_for_elements_to_map_fromIterable
- prefer_foreach
- prefer_function_declarations_over_variables
Expand Down Expand Up @@ -152,6 +161,7 @@ linter:
- type_init_formals
- type_literal_in_constant_pattern
- unawaited_futures
- unintended_html_in_doc_comment
- unnecessary_await_in_return
- unnecessary_brace_in_string_interps
- unnecessary_breaks
Expand All @@ -161,6 +171,7 @@ linter:
- unnecessary_lambdas
- unnecessary_late
- unnecessary_library_directive
- unnecessary_library_name
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_aware_operator_on_extension_on_nullable
Expand Down
2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
langchaindart.com
langchaindart.dev
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ LCEL is a declarative way to compose chains. LCEL was designed from day 1 to sup

- [Overview](/expression_language/expression_language): LCEL and its benefits
- [Interface](/expression_language/interface): The standard interface for LCEL objects
- [Cookbook](https://langchaindart.com/#/expression_language/cookbook/prompt_llm_parser): Example code for accomplishing common tasks
- [Cookbook](https://langchaindart.dev/#/expression_language/cookbook/prompt_llm_parser): Example code for accomplishing common tasks

## Modules

Expand Down
7 changes: 6 additions & 1 deletion docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- [![Code Assist AI](https://img.shields.io/badge/AI-Code%20Assist-EB9FDA)](https://app.commanddash.io/agent?github=https://github.com/davidmigloz/langchain_dart)
- [Get started](README.md)
- [Installation](/get_started/installation.md)
- [Quickstart](/get_started/quickstart.md)
Expand All @@ -13,7 +14,9 @@
- [Function: Run custom logic](/expression_language/primitives/function.md)
- [Binding: Configuring runnables](/expression_language/primitives/binding.md)
- [Router: Routing inputs](/expression_language/primitives/router.md)
- [Retry: Retrying runnables](/expression_language/primitives/retry.md)
- [Streaming](/expression_language/streaming.md)
- [Fallbacks](/expression_language/fallbacks.md)
- Cookbook
- [Prompt + LLM](/expression_language/cookbook/prompt_llm_parser.md)
- [Multiple chains](/expression_language/cookbook/multiple_chains.md)
Expand Down Expand Up @@ -56,6 +59,7 @@
- [Tool calling](/modules/model_io/models/chat_models/how_to/tools.md)
- [LLMChain](/modules/model_io/models/chat_models/how_to/llm_chain.md)
- Integrations
- [Anthropic](/modules/model_io/models/chat_models/integrations/anthropic.md)
- [OpenAI](/modules/model_io/models/chat_models/integrations/openai.md)
- [Firebase Vertex AI](/modules/model_io/models/chat_models/integrations/firebase_vertex_ai.md)
- [GCP Vertex AI](/modules/model_io/models/chat_models/integrations/gcp_vertex_ai.md)
Expand Down Expand Up @@ -94,6 +98,7 @@
- [Vector stores](/modules/retrieval/vector_stores/vector_stores.md)
- Integrations
- [Memory](/modules/retrieval/vector_stores/integrations/memory.md)
- [ObjectBox](/modules/retrieval/vector_stores/integrations/objectbox.md)
- [Chroma](/modules/retrieval/vector_stores/integrations/chroma.md)
- [Pinecone](/modules/retrieval/vector_stores/integrations/pinecone.md)
- [Supabase](/modules/retrieval/vector_stores/integrations/supabase.md)
Expand All @@ -118,7 +123,7 @@
- [Memory](/modules/memory/memory.md)
- [Agents](/modules/agents/agents.md)
- [Agent types](/modules/agents/agent_types/agent_types.md)
- [OpenAI functions](/modules/agents/agent_types/openai_tools_agent.md)
- [Tools Agent](/modules/agents/agent_types/tools_agent.md)
- [Tools](/modules/agents/tools/tools.md)
- [Calculator](/modules/agents/tools/calculator.md)
- [DALL-E Image Generator](/modules/agents/tools/openai_dall_e.md)
Expand Down
6 changes: 3 additions & 3 deletions docs/expression_language/cookbook/prompt_llm_parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ print(res);
// },
// finishReason: FinishReason.stop,
// metadata: {
// model: gpt-3.5-turbo-0125,
// model: gpt-4o-mini,
// created: 1714835666,
// system_fingerprint: fp_3b956da36b
// },
Expand Down Expand Up @@ -74,7 +74,7 @@ print(res);
// },
// finishReason: FinishReason.stop,
// metadata: {
// model: gpt-3.5-turbo-0125,
// model: gpt-4o-mini,
// created: 1714835734,
// system_fingerprint: fp_a450710239
// },
Expand Down Expand Up @@ -144,7 +144,7 @@ print(res);
// },
// finishReason: FinishReason.stop,
// metadata: {
// model: gpt-3.5-turbo-0125,
// model: gpt-4o-mini,
// created: 1714835806,
// system_fingerprint: fp_3b956da36b
// },
Expand Down
135 changes: 135 additions & 0 deletions docs/expression_language/fallbacks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# Fallbacks

When working with language models, you may often encounter issues from the underlying APIs, e.g. rate limits or downtime. Therefore, as you move your LLM applications into production it becomes more and more important to have contingencies for errors. That's why we've introduced the concept of fallbacks.

Crucially, fallbacks can be applied not only on the LLM level but on the whole runnable level. This is important because often times different models require different prompts. So if your call to OpenAI fails, you don't just want to send the same prompt to Anthropic - you probably want to use e.g. a different prompt template.

## Handling LLM API errors with fallbacks

This is maybe the most common use case for fallbacks. A request to an LLM API can fail for a variety of reasons - the API could be down, you could have hit a rate limit, or any number of things. This Situation can be handled using Fallbacks.

Fallbacks can be created using `withFallbacks()` function on the runnable that you are working on, for example `final runnablWithFallbacks = mainRunnable.withFallbacks([fallback1, fallback2])` this would create a `RunnableWithFallback` along with a list of fallbacks. When it is invoked, the `mainRunnable` would be called first, if it fails then fallbacks would be invoked sequentially until one of the fallback in list return output. If the `mainRunnable` succeeds and returns output then the fallbacks won't be called.

## Fallback for chat models

```dart
// fake model will throw error during invoke and fallback model will be called
final fakeOpenAIModel = ChatOpenAI(
defaultOptions: const ChatOpenAIOptions(model: 'tomato'),
);

final latestModel = ChatOpenAI(
defaultOptions: const ChatOpenAIOptions(model: 'gpt-4o'),
);

final modelWithFallbacks = fakeOpenAIModel.withFallbacks([latestModel]);

final prompt = PromptValue.string('Explain why sky is blue in 2 lines');

final res = await modelWithFallbacks.invoke(prompt);
print(res);
/*
{
"ChatResult": {
"id": "chatcmpl-9nKBcFNkzo5qUrdNB92b36J0d1meA",
"output": {
"AIChatMessage": {
"content": "The sky appears blue because molecules in the Earth's atmosphere scatter shorter wavelength blue light from the sun more effectively than longer wavelengths like red. This scattering process is known as Rayleigh scattering.",
"toolCalls": []
}
},
"finishReason": "FinishReason.stop",
"metadata": {
"model": "gpt-4o-2024-05-13",
"created": 1721542696,
"system_fingerprint": "fp_400f27fa1f"
},
"usage": {
"LanguageModelUsage": {
"promptTokens": 16,
"promptBillableCharacters": null,
"responseTokens": 36,
"responseBillableCharacters": null,
"totalTokens": 52
}
},
"streaming": false
}
}
*/
```

Note: if the options provided when invoking the runnable with fallbacks are not compatible with some of the fallbacks, they will be ignored. If you want to use different options for different fallbacks, provide them as `defaultOptions` when instantiating the fallbacks or use `bind()`.

## Fallbacks for RunnableSequences with batch

```dart
final fakeOpenAIModel = ChatOpenAI(
defaultOptions: const ChatOpenAIOptions(model: 'tomato'),
);

final latestModel = ChatOpenAI(
defaultOptions: const ChatOpenAIOptions(model: 'gpt-4o'),
);

final promptTemplate = ChatPromptTemplate.fromTemplate('tell me a joke about {topic}');

final badChain = promptTemplate.pipe(fakeOpenAIModel);
final goodChain = promptTemplate.pipe(latestModel);

final chainWithFallbacks = badChain.withFallbacks([goodChain]);

final res = await chainWithFallbacks.batch(
[
{'topic': 'bears'},
{'topic': 'cats'},
],
);
print(res);
/*
[
{
"id": "chatcmpl-9nKncT4IpAxbUxrEqEKGB0XUeyGRI",
"output": {
"content": "Sure! How about this one?\n\nWhy did the bear bring a suitcase to the forest?\n\nBecause it wanted to pack a lunch! 🐻🌲",
"toolCalls": []
},
"finishReason": "FinishReason.stop",
"metadata": {
"model": "gpt-4o-2024-05-13",
"created": 1721545052,
"system_fingerprint": "fp_400f27fa1f"
},
"usage": {
"promptTokens": 13,
"promptBillableCharacters": null,
"responseTokens": 31,
"responseBillableCharacters": null,
"totalTokens": 44
},
"streaming": false
},
{
"id": "chatcmpl-9nKnc58FpXFTPkzZfm2hHxJ5VSQQh",
"output": {
"content": "Sure, here's a cat joke for you:\n\nWhy was the cat sitting on the computer?\n\nBecause it wanted to keep an eye on the mouse!",
"toolCalls": []
},
"finishReason": "FinishReason.stop",
"metadata": {
"model": "gpt-4o-2024-05-13",
"created": 1721545052,
"system_fingerprint": "fp_c4e5b6fa31"
},
"usage": {
"promptTokens": 13,
"promptBillableCharacters": null,
"responseTokens": 29,
"responseBillableCharacters": null,
"totalTokens": 42
},
"streaming": false
}
]
*/
```
2 changes: 1 addition & 1 deletion docs/expression_language/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ print(res2);
// },
// finishReason: FinishReason.stop,
// metadata: {
// model: gpt-3.5-turbo-0125,
// model: gpt-4o-mini,
// created: 1714327251,
// system_fingerprint: fp_3b956da36b
// },
Expand Down
Loading
Loading