mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-25 16:13:25 +00:00
bump version to 0063 (#616)
This commit is contained in:
parent
57bbc5d6da
commit
2a54e73fec
@ -51,10 +51,55 @@
|
||||
"search.run(\"Obama's first name?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fe3ee213",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Custom Parameters\n",
|
||||
"You can also customize the SerpAPI wrapper with arbitrary parameters. For example, in the below example we will use `bing` instead of `google`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "deffcc8b",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"params = {\n",
|
||||
" \"engine\": \"bing\",\n",
|
||||
" \"gl\": \"us\",\n",
|
||||
" \"hl\": \"en\",\n",
|
||||
"}\n",
|
||||
"search = SerpAPIWrapper(params=params)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "2c752d08",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'Barack Hussein Obama II is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American presi…New content will be added above the current area of focus upon selectionBarack Hussein Obama II is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States. He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004, and previously worked as a civil rights lawyer before entering politics.Wikipediabarackobama.com'"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"search.run(\"Obama's first name?\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "27f5959a",
|
||||
"id": "e0a1dc1c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
|
@ -31,6 +31,12 @@ class QAEvalChain(LLMChain):
|
||||
Returns:
|
||||
QAEvalChain: the loaded QA eval chain.
|
||||
"""
|
||||
expected_input_vars = {"query", "answer", "result"}
|
||||
if expected_input_vars != set(prompt.input_variables):
|
||||
raise ValueError(
|
||||
f"Input variables should be {expected_input_vars}, "
|
||||
f"but got {prompt.input_variables}"
|
||||
)
|
||||
return cls(llm=llm, prompt=prompt, **kwargs)
|
||||
|
||||
def evaluate(
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langchain"
|
||||
version = "0.0.62"
|
||||
version = "0.0.63"
|
||||
description = "Building applications with LLMs through composability"
|
||||
authors = []
|
||||
license = "MIT"
|
||||
|
Loading…
Reference in New Issue
Block a user