Skip to content

Commit

Permalink
Syntax highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
ajosh0504 committed Feb 4, 2025
1 parent 6d75f0b commit dece6f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/30-agent-tools/1-lecture-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ The easiest way to define tools in LangChain is using the `@tool` decorator. The

An example of a tool in LangChain is as follows:

```
```python
@tool("search-tool", return_direct=True)
def search(query: str) -> str:
"""Look up things online."""
return "MongoDB"
```
An example of a tool call is as follows:

```
```json
{
"name": "search-tool",
"args": {
Expand Down
6 changes: 3 additions & 3 deletions docs/30-agent-tools/4-create-agent-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ get_embedding(user_query)
<details>
<summary>Answer</summary>
<div>
```python
```json
[
{
"$vectorSearch": {
Expand Down Expand Up @@ -78,7 +78,7 @@ vs_collection.aggregate(pipeline)
<details>
<summary>Answer</summary>
<div>
```python
```json
{"title": user_query}
```
</div>
Expand All @@ -89,7 +89,7 @@ vs_collection.aggregate(pipeline)
<details>
<summary>Answer</summary>
<div>
```python
```json
{"_id": 0, "body": 1}
```
</div>
Expand Down

0 comments on commit dece6f8

Please sign in to comment.