You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/core_docs/docs/integrations/vectorstores/memory.ipynb
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
"id": "ef1f0986",
20
20
"metadata": {},
21
21
"source": [
22
-
"# `MemoryVectorStore`\n",
22
+
"# MemoryVectorStore\n",
23
23
"\n",
24
24
"LangChain offers is an in-memory, ephemeral vectorstore that stores embeddings in-memory and does an exact, linear search for the most similar embeddings. The default similarity metric is cosine similarity, but can be changed to any of the similarity metrics supported by [ml-distance](https://mljs.github.io/distance/modules/similarity.html).\n",
* import { DuckDuckGoSearch } from "@langchain/community/tools/duckduckgo_search";
43
+
*
44
+
* const tool = new DuckDuckGoSearch({ maxResults: 1 });
45
+
* ```
46
+
* </details>
47
+
*
48
+
* <br />
49
+
*
50
+
* <details>
51
+
*
52
+
* <summary><strong>Invocation</strong></summary>
53
+
*
54
+
* ```typescript
55
+
* await tool.invoke("what is the current weather in sf?");
56
+
*
57
+
* // output: [{"title":"San Francisco, CA Current Weather | AccuWeather","link":"https://www.accuweather.com/en/us/san-francisco/94103/current-weather/347629","snippet":"<b>Current</b> <b>weather</b> <b>in</b> San Francisco, CA. Check <b>current</b> conditions in San Francisco, CA with radar, hourly, and more."}]
58
+
* ```
59
+
* </details>
60
+
*
61
+
* <br />
62
+
*
63
+
* <details>
64
+
*
65
+
* <summary><strong>Invocation with tool call</strong></summary>
66
+
*
67
+
* ```typescript
68
+
* // This is usually generated by a model, but we'll create a tool call directly for demo purposes.
69
+
* const modelGeneratedToolCall = {
70
+
* args: {
71
+
* input: "what is the current weather in sf?",
72
+
* },
73
+
* id: "tool_call_id",
74
+
* name: tool.name,
75
+
* type: "tool_call",
76
+
* };
77
+
* await tool.invoke(modelGeneratedToolCall);
78
+
* ```
79
+
*
80
+
* ```text
81
+
* ToolMessage {
82
+
* "content": "[{\"title\":\"San Francisco, CA Weather Conditions | Weather Underground\",\"link\":\"https://www.wunderground.com/weather/us/ca/san-francisco\",\"snippet\":\"San Francisco <b>Weather</b> Forecasts. <b>Weather</b> Underground provides local & long-range <b>weather</b> forecasts, weatherreports, maps & tropical <b>weather</b> conditions for the San Francisco area.\"}]",
0 commit comments