Skip to content

Commit 0071ab2

Browse files
authored
Update openai_assistants.md
1 parent 10f96fc commit 0071ab2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

sources/platform/integrations/ai/openai_assistants.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Next, we’ll show how to save data from Apify Actors into the OpenAI Vector Sto
2020

2121
## Real-time search data for OpenAI Assistant
2222

23-
We'll use [RAG-Web-Browser](https://apify.com/apify/rag-web-browser) to fetch the latest information from the web and provide it to the OpenAI Assistant through [function calling](https://platform.openai.com/docs/assistants/tools/function-calling?context=without-streaming).
23+
We'll use the [RAG Web Browser](https://apify.com/apify/rag-web-browser) Actor to fetch the latest information from the web and provide it to the OpenAI Assistant through [function calling](https://platform.openai.com/docs/assistants/tools/function-calling?context=without-streaming).
2424
To begin, we need to create an OpenAI Assistant with the appropriate instructions.
2525
After that, we can initiate a conversation with the assistant by creating a thread, adding messages, and running the assistant to receive responses.
2626
The image below provides an overview of the entire process:
@@ -65,7 +65,7 @@ INSTRUCTIONS = """ You are a smart and helpful assistant. Maintain an expert, fr
6565
```
6666

6767
Next, we define a function description with two parameters, search query (`query`) and number of results we need to retrieve (`maxResults`).
68-
The RAG-Web-Browser can be called with more parameters, check the [Actor input schema](https://apify.com/apify/rag-web-browser/input-schema) for details.
68+
RAG Web Browser can be called with more parameters, check the [Actor input schema](https://apify.com/apify/rag-web-browser/input-schema) for details.
6969

7070
```python
7171
rag_web_browser_function = {
@@ -124,7 +124,7 @@ run = client.beta.threads.runs.create_and_poll(thread_id=thread.id, assistant_id
124124

125125
Finally, we need to check the run status to determine if the assistant requires any action to retrieve the search data.
126126
If it does, we must submit the results using the `submit_tool_outputs` function.
127-
This function will trigger the RAG-Web-Browser to fetch the search data and submit it to the assistant for processing.
127+
This function will trigger RAG Web Browser to fetch the search data and submit it to the assistant for processing.
128128

129129
Let's implement the `submit_tool_outputs` function:
130130

@@ -137,7 +137,7 @@ def submit_tool_outputs(run_):
137137
d = json.loads(tool.function.arguments)
138138
output = call_rag_web_browser(query=d["query"], max_results=d["maxResults"])
139139
tool_output.append(ToolOutput(tool_call_id=tool.id, output=json.dumps(output)))
140-
print("RAG-Web-Browser added as a tool output.")
140+
print("RAG Web Browser added as a tool output.")
141141

142142
return client.beta.threads.runs.submit_tool_outputs_and_poll(thread_id=run_.thread_id, run_id=run_.id, tool_outputs=tool_output)
143143
```
@@ -165,7 +165,7 @@ Assistant response:
165165
The latest news on LLM is as follows:
166166
- [OpenAI](https://openai.com) has released a new version of GPT-4.
167167
- [Hugging Face](https://huggingface.co) has updated their Transformers library.
168-
- [Apify](https://apify.com) has released a new RAG-Web-Browser.
168+
- [Apify](https://apify.com) has released a new RAG Web Browser.
169169
```
170170

171171
<details>
@@ -415,7 +415,7 @@ for m in client.beta.threads.messages.list(thread_id=run.thread_id):
415415

416416
## Resources
417417

418-
- [Open AI Assistants](https://platform.openai.com/docs/assistants/overview)
419-
- [Open AI Function Calling](https://platform.openai.com/docs/assistants/tools/function-calling)
420-
- [Apify - RAG Web Browser](https://apify.com/apify/rag-web-browser)
421-
- [Apify - OpenAI Vector Store Integration](https://apify.com/jiri.spilka/openai-vector-store-integration)
418+
- [OpenAI Assistants](https://platform.openai.com/docs/assistants/overview)
419+
- [OpenAI function calling](https://platform.openai.com/docs/assistants/tools/function-calling)
420+
- [RAG Web Browser](https://apify.com/apify/-browser) Actor
421+
- [OpenAI Vector Store Integration](https://apify.com/jiri.spilka/openai-vector-store-integration) Actor

0 commit comments

Comments
 (0)