Tomaz Bratanic
020c562737
experimental[patch]: Skip pydantic validation for llm graph transformer and fix JSON response where possible ( #19915 )
...
LLMs might sometimes return invalid response for LLM graph transformer.
Instead of failing due to pydantic validation, we skip it and manually
check and optionally fix error where we can, so that more information
gets extracted
2024-04-25 17:39:38 -07:00
Erick Friis
cdb84d6798
docs: langchain-chroma package ( #20394 )
2024-04-25 17:39:38 -07:00
Haris Ali
fdff9d4b1b
docs: Adding api documentation link at the end of each output parser class description page. ( #20391 )
...
- **Description:** Added cross-links for easy access of api
documentation of each output parser class from it's description page.
- **Issue:** related to issue #19969
Co-authored-by: Haris Ali <haris.ali@formulatrix.com >
2024-04-25 17:39:38 -07:00
P. Taylor Goetz
5d88df0374
community[patch]: Add "model" attribute to the payload sent to Ollama in ChatOllama ( #20354 )
...
Example Ollama API calls:
Request without "model":
```
curl --location 'http://localhost:11434/api/chat ' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "What is the capitol of PA?"
}
],
"stream": false
}'
```
Response:
```
{"error":"model is required"}
```
Request with "model":
```
curl --location 'http://localhost:11434/api/chat ' \
--header 'Content-Type: application/json' \
--data '{
"model": "openchat",
"messages": [
{
"role": "user",
"content": "What is the capitol of PA?"
}
],
"stream": false
}'
```
Response:
```
{
"eval_duration" : 733248000,
"created_at" : "2024-04-11T23:04:08.735766843Z",
"model" : "openchat",
"message" : {
"content" : " The capital city of Pennsylvania is Harrisburg.",
"role" : "assistant"
},
"total_duration" : 3138731168,
"prompt_eval_count" : 25,
"load_duration" : 466562959,
"done" : true,
"prompt_eval_duration" : 1938495000,
"eval_count" : 10
}
```
2024-04-25 17:39:38 -07:00
Bagatur
b20ecc2366
docs: vertexai tool call update ( #20362 )
2024-04-25 17:39:38 -07:00
Alex Sherstinsky
c6bd0d46ec
community: for Predibase -- enable both Predibase-hosted and HuggingFace-hosted fine-tuned adapter repositories ( #20370 )
2024-04-25 17:39:38 -07:00
ccurme
ce68a4e6f4
docs: add Cohere to ChatModelTabs ( #20386 )
2024-04-25 17:39:38 -07:00
Eugene Yurtsev
04069996cf
langchain[patch]: Add deprecation warning to extraction chains ( #20224 )
...
Add deprecation warnings to extraction chains
2024-04-25 17:39:38 -07:00
Eugene Yurtsev
5adce0caa1
langchain[patch]: Add another unit test for indexing code ( #20387 )
...
Add another unit test for indexing
2024-04-25 17:39:38 -07:00
Erick Friis
038970bc7f
core: bind_tools interface on basechatmodel ( #20360 )
2024-04-25 17:39:38 -07:00
Erick Friis
a49e7cae1d
multiple: standard chat model tests ( #20359 )
2024-04-25 17:39:38 -07:00
Bagatur
846c6fcaf4
docs: show tool msg in tool call docs ( #20358 )
2024-04-25 17:39:38 -07:00
Isak Nyberg
2ceb2a3ce4
community: add gpt-4 pricing in callback ( #20292 )
...
Added the pricing for `gpt-4-turbo` and `gpt-4-turbo-2024-04-09` in the
callback method.
related to issue #17173
https://openai.com/pricing#language-models
2024-04-25 17:39:38 -07:00
Ikko Eltociear Ashimine
1ead1f667e
docs: Update ibm_watsonx.ipynb ( #20329 )
...
avaliable -> available
- **Description:** fixed typo
- **Issue:** the issue # it fixes, if applicable
- **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!
2024-04-25 17:39:38 -07:00
Jack Wotherspoon
9c1537bcdf
docs: add Cloud SQL for MySQL vector store integration docs ( #20278 )
...
Adding docs page for `Google Cloud SQL for MySQL` vector store
integration. This was recently released as part of the Cloud SQL for
MySQL LangChain package
([release](https://github.com/googleapis/langchain-google-cloud-sql-mysql-python/releases/tag/v0.2.0 ))
Co-authored-by: Erick Friis <erick@langchain.dev >
2024-04-25 17:39:38 -07:00
Leonid Ganeline
c10aa62f12
community[patch]: docstrings update ( #20301 )
...
Added missed docstrings. Format docstings to the consistent form.
2024-04-25 17:39:38 -07:00
Eugene Yurtsev
4fd13632ce
core[patch]: Update documentation for base retriever ( #20345 )
...
Updating in code documentation for base retriever to direct folks toward
the .invoke and .ainvoke methods + explain how to implement
2024-04-25 17:39:38 -07:00
Bagatur
585abbc8d7
docs: tool call nits ( #20356 )
2024-04-25 17:39:38 -07:00
Bagatur
4d7ae633b6
docs: tool agent nit ( #20353 )
2024-04-25 17:39:38 -07:00
Erick Friis
8f62446485
chroma: release 0.1.0 ( #20355 )
2024-04-25 17:39:38 -07:00
Bagatur
349dde1549
docs: use vertexai in chat model tabs ( #20352 )
2024-04-25 17:39:38 -07:00
Bagatur
46f9304f21
docs: update anthropic tool call ( #20344 )
2024-04-25 17:39:38 -07:00
Erick Friis
162daa3c62
chroma: remove relevance score int test ( #20346 )
...
deprecating feature in #20302
2024-04-25 17:39:38 -07:00
Eugene Yurtsev
a9f6fd16c8
docs: Update chat model providers include package information ( #20336 )
...
Include package information
2024-04-25 17:39:38 -07:00
Bagatur
b4d40b3622
docs: update tool-calling table ( #20338 )
2024-04-25 17:39:38 -07:00
Bagatur
83958c7d2b
docs: tool agent nit ( #20337 )
2024-04-25 17:39:38 -07:00
Bagatur
8b8e35cd51
docs: update chat openai ( #20331 )
2024-04-25 17:39:38 -07:00
Bagatur
d68af26443
docs: add tool-calling agent ( #20328 )
2024-04-25 17:39:38 -07:00
ccurme
a7732aa55e
docs: add component page for tool calls ( #20282 )
...
Note: includes links to API reference pages for ToolCall and other
objects that currently don't exist (e.g.,
https://api.python.langchain.com/en/latest/messages/langchain_core.messages.tool.ToolCall.html#langchain_core.messages.tool.ToolCall ).
2024-04-25 17:39:38 -07:00
Bagatur
463436a0e8
langchain[patch]: Release 0.1.16 ( #20335 )
2024-04-25 17:39:38 -07:00
Eugene Yurtsev
463ea8d7f6
docs: Update list of chat models tool calling providers ( #20330 )
...
Will follow up with a few missing providers
2024-04-25 17:39:37 -07:00
Eugene Yurtsev
4b575d8e78
docs: Update documentation for custom LLMs ( #19972 )
...
Update documentation for customizing LLMs
2024-04-25 17:39:37 -07:00
Bagatur
418df2bb6c
release anthropic, fireworks, openai, groq, mistral ( #20333 )
2024-04-25 17:39:37 -07:00
Bagatur
6b3b4fdd9c
core[patch]: Release 0.1.42 ( #20332 )
2024-04-25 17:39:37 -07:00
ccurme
e6ea42d7f0
mistral[patch]: add IDs to tool calls ( #20299 )
...
Mistral gives us one ID per response, no individual IDs for tool calls.
```python
from langchain.agents import AgentExecutor, create_tool_calling_agent, tool
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_mistralai import ChatMistralAI
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful assistant"),
("human", "{input}"),
MessagesPlaceholder("agent_scratchpad"),
]
)
model = ChatMistralAI(model="mistral-large-latest", temperature=0)
@tool
def magic_function(input: int) -> int:
"""Applies a magic function to an input."""
return input + 2
tools = [magic_function]
agent = create_tool_calling_agent(model, tools, prompt)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
agent_executor.invoke({"input": "what is the value of magic_function(3)?"})
```
---------
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com >
2024-04-25 17:39:37 -07:00
Eugene Yurtsev
269be353d6
community[patch]: Add deprecation warnings to postgres implementation ( #20222 )
...
Add deprecation warnings to postgres implementation that are in langchain-postgres.
2024-04-25 17:39:37 -07:00
Eugene Yurtsev
ad58b3fc19
core[patch]: For now remove user warning ( #20321 )
...
Remove warning since it creates a lot of noise.
2024-04-25 17:39:37 -07:00
Mayank Solanki
f84ad4c2fd
docs: added backtick on RunnablePassthrough ( #20310 )
...
added backtick on RunnablePassthrough
Isuue: #20094
2024-04-25 17:39:37 -07:00
Bagatur
a7bae5767e
openai[patch]: use tool_calls in request ( #20272 )
2024-04-25 17:39:37 -07:00
Bagatur
a4aefd124d
langchain[patch]: agents check prompt partial vars ( #20303 )
2024-04-25 17:39:37 -07:00
Bagatur
689dc75d94
core[patch]: fix ChatGeneration.text with content blocks ( #20294 )
2024-04-25 17:39:37 -07:00
Bagatur
e8197740b2
core[patch]: include tool_calls in ai msg chunk serialization ( #20291 )
2024-04-25 17:39:37 -07:00
Erick Friis
9b9d64c79a
chroma: bump rc, keep optional ( #20298 )
2024-04-25 17:39:37 -07:00
Erick Friis
8f2cd107f0
chroma: add required fastapi dep to restrict to <1 ( #20297 )
2024-04-25 17:39:37 -07:00
Erick Friis
59d97ca085
chroma: add optional fastapi dep to restrict to <1 ( #20295 )
2024-04-25 17:39:37 -07:00
killind-dev
33afc46207
chroma: Add chroma partner package ( #19292 )
...
**Description:** Adds chroma to the partners package. Tests & code
mirror those in the community package.
**Dependencies:** None
**Twitter handle:** @akiradev0x
---------
Co-authored-by: Erick Friis <erick@langchain.dev >
2024-04-25 17:39:37 -07:00
Yuki Watanabe
52b28c328c
core[patch]: fix duplicated kwargs in _load_sql_databse_chain ( #19908 )
...
`kwargs` is specified twice in [this
line](3218463f6a/libs/langchain/langchain/chains/loading.py (L386) ),
causing runtime error when passing any keyword arguments.
2024-04-25 17:39:37 -07:00
ccurme
42e1165a33
docs: update tool calling cookbook ( #20290 )
...
Co-authored-by: Erick Friis <erick@langchain.dev >
2024-04-25 17:39:37 -07:00
Nuno Campos
71e771118e
core: mustache prompt templates ( #19980 )
...
Co-authored-by: Erick Friis <erick@langchain.dev >
2024-04-25 17:39:37 -07:00
Leonid Ganeline
5133b56cf7
community[patch]: import flattening fix ( #20110 )
...
This PR should make it easier for linters to do type checking and for IDEs to jump to definition of code.
See #20050 as a template for this PR.
- As a byproduct: Added 3 missed `test_imports`.
- Added missed `SolarChat` in to __init___.py Added it into test_import
ut.
- Added `# type: ignore` to fix linting. It is not clear, why linting
errors appear after ^ changes.
---------
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com >
2024-04-25 17:39:37 -07:00