Skip to content

Commit dece6f8

Browse files
author
ajosh0504
committed
Syntax highlighting
1 parent 6d75f0b commit dece6f8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/30-agent-tools/1-lecture-notes.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ The easiest way to define tools in LangChain is using the `@tool` decorator. The
2323

2424
An example of a tool in LangChain is as follows:
2525

26-
```
26+
```python
2727
@tool("search-tool", return_direct=True)
2828
def search(query: str) -> str:
2929
"""Look up things online."""
3030
return "MongoDB"
3131
```
3232
An example of a tool call is as follows:
3333

34-
```
34+
```json
3535
{
3636
"name": "search-tool",
3737
"args": {

docs/30-agent-tools/4-create-agent-tools.mdx

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ get_embedding(user_query)
3939
<details>
4040
<summary>Answer</summary>
4141
<div>
42-
```python
42+
```json
4343
[
4444
{
4545
"$vectorSearch": {
@@ -78,7 +78,7 @@ vs_collection.aggregate(pipeline)
7878
<details>
7979
<summary>Answer</summary>
8080
<div>
81-
```python
81+
```json
8282
{"title": user_query}
8383
```
8484
</div>
@@ -89,7 +89,7 @@ vs_collection.aggregate(pipeline)
8989
<details>
9090
<summary>Answer</summary>
9191
<div>
92-
```python
92+
```json
9393
{"_id": 0, "body": 1}
9494
```
9595
</div>

0 commit comments

Comments
 (0)