Skip to content

Commit

Permalink
Remove language="..."
Browse files Browse the repository at this point in the history
  • Loading branch information
bonk1t committed Nov 22, 2024
1 parent a26d180 commit 96d8e82
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
5 changes: 2 additions & 3 deletions docs_new/advanced-topics/asynchronous-execution.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Asynchronous execution allows agents and tools to operate concurrently, improvin

To enable asynchronous execution for agents, set the `async_mode` parameter to `"threading"` when initializing the agency.

<CodeBlock title="Initialize Agency with Asynchronous Agents" language="python">
<CodeBlock title="Initialize Agency with Asynchronous Agents">
```python
agency = Agency(agents=[ceo], async_mode='threading')
```
Expand All @@ -27,7 +27,7 @@ agency = Agency(agents=[ceo], async_mode='threading')

To enable asynchronous execution for tools, set the `async_mode` parameter to `"tools_threading"`.

<CodeBlock title="Initialize Agency with Asynchronous Tools" language="python">
<CodeBlock title="Initialize Agency with Asynchronous Tools">
```python
agency = Agency(agents=[ceo], async_mode='tools_threading')
```
Expand All @@ -47,4 +47,3 @@ When using asynchronous execution, be mindful of concurrency issues.
- **Concurrency Control**: Ensure thread-safe operations to prevent race conditions. Use thread locks or other synchronization mechanisms if necessary.

- **Resource Management**: Monitor system resources to avoid overconsumption due to multiple threads. Keep an eye on CPU and memory usage.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Custom prompts and few-shot learning help your agents understand the desired res

Adjust the `instructions.md` file associated with your agent to change how it responds.

<CodeBlock title="instructions.md" language="markdown">
<CodeBlock title="instructions.md">
```markdown
# Agent Instructions

Expand All @@ -28,7 +28,7 @@ You are a friendly assistant that helps users with booking flights and hotels.

Programmatically alter prompts based on context or user input.

<CodeBlock title="Dynamic Prompt Example" language="python">
<CodeBlock title="Dynamic Prompt Example">
```python
base_instructions = "You are an assistant who provides technical support."

Expand All @@ -47,7 +47,7 @@ Few-shot examples provide sample interactions to guide agent responses.

### Implementation

<CodeBlock title="Providing Few-Shot Examples" language="python">
<CodeBlock title="Providing Few-Shot Examples">
```python
examples = [
{"role": "user", "content": "Hi!"},
Expand Down
10 changes: 5 additions & 5 deletions docs_new/advanced-topics/open-source-models-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Fully local and stable, supports Assistants API V1.
<Step title="Install Required Packages" icon="download" iconType="solid">
Use pip to install necessary packages.

<CodeBlock language="bash">
<CodeBlock>
```bash
pip install astra-assistants-api gradio
```
Expand All @@ -41,7 +41,7 @@ pip install astra-assistants-api gradio
<Step title="Set Up API Clients" icon="cogs" iconType="solid">
Configure your API clients to use the open-source models.

<CodeBlock language="python">
<CodeBlock>
```python
from openai import OpenAI
from astra_assistants import patch
Expand All @@ -55,7 +55,7 @@ set_openai_client(client)
<Step title="Create Agents with Open-Source Models" icon="user-plus" iconType="solid">
Instantiate your agents using the open-source models.

<CodeBlock language="python">
<CodeBlock>
```python
ceo = Agent(name="CEO", model='ollama/llama3')
```
Expand All @@ -65,7 +65,7 @@ ceo = Agent(name="CEO", model='ollama/llama3')
<Step title="Run the Agency" icon="play" iconType="solid">
Start your agency with the configured agents.

<CodeBlock language="python">
<CodeBlock>
```python
agency = Agency([ceo])
agency.run_demo()
Expand All @@ -83,4 +83,4 @@ Be aware of the limitations when using open-source models.

- **Function Calling**: Not supported by most open-source models.
- **Retrieval-Augmented Generation**: Often limited; consider custom implementations.
- **Code Interpreter**: Not supported in current open-source assistants.
- **Code Interpreter**: Not supported in current open-source assistants.
11 changes: 6 additions & 5 deletions docs_new/contributing/contributing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Thorough testing ensures that your contributions are reliable and integrate seam

- **Location**: Place tests in the `agency_swarm/tests/` directory, specifically within `test_tools.py` or relevant test files based on the component.

<CodeBlock title="Example Test" language="python">
<CodeBlock title="Example Test">
```python
def test_my_custom_tool():
tool = MyCustomTool(example_field="test value")
Expand All @@ -151,7 +151,7 @@ Create a fork of the Agency Swarm repository on GitHub.
<Accordion title="2. Create a Branch" icon="code" iconType="solid">
Work on a feature branch for your changes.

<CodeBlock language="bash">
<CodeBlock>
```bash
git checkout -b feature/your-feature-name
```
Expand All @@ -161,7 +161,7 @@ git checkout -b feature/your-feature-name
<Accordion title="3. Commit Your Changes" icon="git-commit" iconType="solid">
Commit your changes with clear and descriptive messages.

<CodeBlock language="bash">
<CodeBlock>
```bash
git add .
git commit -m "Add [feature]: Description of the feature"
Expand All @@ -172,7 +172,7 @@ git commit -m "Add [feature]: Description of the feature"
<Accordion title="4. Push to Your Fork" icon="git-push" iconType="solid">
Push your changes to your forked repository.

<CodeBlock language="bash">
<CodeBlock>
```bash
git push origin feature/your-feature-name
```
Expand All @@ -182,7 +182,8 @@ git push origin feature/your-feature-name
<Accordion title="5. Submit a Pull Request" icon="paper-plane" iconType="solid">
Describe your changes and submit a pull request for review.

<CodeBlock language="markdown">
<CodeBlock>
```markdown
- Provide a clear title and description for your pull request.
- Reference any related issues.
- Ensure all tests pass and coverage remains adequate.
Expand Down
2 changes: 1 addition & 1 deletion docs_new/faq/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Find answers to common questions about Agency Swarm.
<Accordion title="How do I install Agency Swarm?" icon="download" iconType="solid">
**A**: Install via pip using:

<CodeBlock language="bash">
<CodeBlock>
```bash
pip install agency-swarm
```
Expand Down
6 changes: 3 additions & 3 deletions docs_new/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Set up Agency Swarm in a few simple steps.

<Step title="1. Install via pip" icon="download" iconType="solid">

<CodeBlock language="bash">
<CodeBlock>
```bash
pip install agency-swarm
```
Expand All @@ -25,7 +25,7 @@ pip install agency-swarm

<Step title="2. Verify the Installation" icon="check" iconType="solid">

<CodeBlock language="bash">
<CodeBlock>
```bash
python -c "import agency_swarm; print('Agency Swarm is installed successfully.')"
```
Expand All @@ -34,7 +34,7 @@ python -c "import agency_swarm; print('Agency Swarm is installed successfully.')

<Step title="3. Run a Demo" icon="play" iconType="solid">

<CodeBlock language="python">
<CodeBlock>
```python
from agency_swarm import Agent, Agency

Expand Down

0 comments on commit 96d8e82

Please sign in to comment.