Skip to content

Commit

Permalink
Docs(README): Fix mistakes in README (#613)
Browse files Browse the repository at this point in the history
<!-- ELLIPSIS_HIDDEN -->



> [!IMPORTANT]
> Fixes mistakes in README files by updating provider names, session
chat structures, and document handling functions.
> 
>   - **Provider and API Key Updates**:
> - Change `provider` from `google` to `brave` and update `api_key`
references in `README.md`, `README-CN.md`, and `README-JP.md`.
>   - **Session Chat Structure**:
> - Update `client.sessions.chat` to use `messages` array instead of
`message` string in `README.md`, `README-CN.md`, and `README-JP.md`.
>   - **Document Handling**:
> - Change `client.documents.create` to `client.agents.docs.create` and
`client.documents.search` to `client.agents.docs.search` in `README.md`,
`README-CN.md`, and `README-JP.md`.
> 
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=julep-ai%2Fjulep&utm_source=github&utm_medium=referral)<sup>
for 867ad75. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
  • Loading branch information
HamadaSalhab authored Oct 8, 2024
1 parent 966f7d8 commit 007c2ef
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 24 deletions.
22 changes: 14 additions & 8 deletions README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,9 @@ client.agents.tools.create(
name="web_search",
description="搜索网络以获取信息。",
integration={
"provider": "google",
"provider": "brave",
"method": "search",
"setup": {"api_key": "your_google_api_key"},
"setup": {"api_key": "your_brave_api_key"},
},
)
```
Expand All @@ -617,7 +617,12 @@ session = client.sessions.create(
# 在同一会话中继续对话
response = client.sessions.chat(
session_id=session.id,
message="继续我们之前的对话。"
messages=[
{
"role": "user",
"content": "继续我们之前的对话。"
}
]
)
```

Expand All @@ -627,15 +632,16 @@ response = client.sessions.chat(

```python
# 上传文档
document = client.documents.create(
file="path/to/document.pdf",
document = client.agents.docs.create(
title="AI advancements",
content="AI is changing the world...",
metadata={"category": "research_paper"}
)

# 搜索文档
results = client.documents.search(
query="AI 进展",
filter={"category": "research_paper"}
results = client.agents.docs.search(
text="AI advancements",
metadata_filter={"category": "research_paper"}
)
```

Expand Down
24 changes: 15 additions & 9 deletions README-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,9 +600,9 @@ client.agents.tools.create(
name="web_search",
description="Search the web for information.",
integration={
"provider": "google",
"provider": "brave",
"method": "search",
"setup": {"api_key": "your_google_api_key"},
"setup": {"api_key": "your_brave_api_key"},
},
)
```
Expand All @@ -614,14 +614,19 @@ Julepは、持続的なインタラクションのための強力なセッショ
```python
session = client.sessions.create(
agent_id=agent.id,
user_id="user123",
user_id=user.id,
context_overflow="adaptive"
)

# 同じセッションで会話を続ける
response = client.sessions.chat(
session_id=session.id,
message="Follow up on our previous conversation."
messages=[
{
"role": "user",
"content": "Follow up on our previous conversation."
}
]
)
```

Expand All @@ -631,15 +636,16 @@ response = client.sessions.chat(

```python
# ドキュメントをアップロードする
document = client.documents.create(
file="path/to/document.pdf",
document = client.agents.docs.create(
title="AI advancements",
content="AI is changing the world...",
metadata={"category": "research_paper"}
)

# ドキュメントを検索する
results = client.documents.search(
query="AI advancements",
filter={"category": "research_paper"}
results = client.agents.docs.search(
text="AI advancements",
metadata_filter={"category": "research_paper"}
)
```

Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,9 @@ client.agents.tools.create(
name="web_search",
description="Search the web for information.",
integration={
"provider": "google",
"provider": "brave",
"method": "search",
"setup": {"api_key": "your_google_api_key"},
"setup": {"api_key": "your_brave_api_key"},
},
)
```
Expand All @@ -805,14 +805,19 @@ Julep provides robust session management for persistent interactions:
```python
session = client.sessions.create(
agent_id=agent.id,
user_id="user123",
user_id=user.id,
context_overflow="adaptive"
)
# Continue conversation in the same session
response = client.sessions.chat(
session_id=session.id,
message="Follow up on our previous conversation."
messages=[
{
"role": "user",
"content": "Follow up on the previous conversation."
}
]
)
```

Expand All @@ -822,15 +827,15 @@ Easily manage and search through documents for your agents:

```python
# Upload a document
document = client.documents.create(
document = client.agents.docs.create(
title="AI advancements",
content="AI is changing the world...",
metadata={"category": "research_paper"}
)
# Search documents
results = client.documents.search(
query="AI advancements",
results = client.agents.docs.search(
text="AI advancements",
metadata_filter={"category": "research_paper"}
)
```
Expand Down

0 comments on commit 007c2ef

Please sign in to comment.