Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cookiecutter #574

Merged
merged 5 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/docs/en/user-guide/ui/console/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ We begin by importing the necessary modules from **FastAgency** and **AutoGen**.
Next, we configure the language model that will power the agents. In this case, we're using **gpt-4o-mini**, and the API key is retrieved from the environment.

```python
{! docs_src/getting_started/no_auth/mesop/my_fastagency_app/my_fastagency_app/workflow.py [ln:9-17] !}
{! docs_src/getting_started/no_auth/mesop/my_fastagency_app/my_fastagency_app/workflow.py [ln:8-17] !}
```

- **Explanation**: The configuration specifies the LLM model and API key used for powering the conversation between agents. The temperature is set to `0.0` to ensure deterministic responses from the agents, making interactions consistent and reliable. This is particularly useful for scenarios where repeatability and predictability are required, such as testing.
Expand All @@ -49,7 +49,7 @@ Next, we configure the language model that will power the agents. In this case,
Here, we define a simple workflow where the **Student Agent** interacts with the **Teacher Agent**. The student asks questions, and the teacher responds as a math teacher. The workflow is registered using **AutoGenWorkflows**.

```python
{! docs_src/getting_started/no_auth/mesop/my_fastagency_app/my_fastagency_app/workflow.py [ln:22-51] !}
{! docs_src/getting_started/no_auth/mesop/my_fastagency_app/my_fastagency_app/workflow.py [ln:18-48] !}
```

- **Agent Overview**: The **Student Agent** is configured with a system message, "You are a student willing to learn," and will initiate questions during the interaction. The **Teacher Agent**, on the other hand, is set up as a math teacher and will respond to the student's questions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

app = FastAgency(
provider=provider,
ui=MesopUI(),
ui=ui,
title="My FastAgency App",
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
from fastagency import FastAgency
from fastagency.ui.mesop import MesopUI
from fastagency.ui.mesop.auth.basic_auth import BasicAuth

from ..workflow import wf

auth = BasicAuth(
# TODO: Replace `allowed_users` with the desired usernames and their
# bcrypt-hashed passwords. One way to generate bcrypt-hashed passwords
# is by using online tools such as https://bcrypt.online
# Default password for all users is `password`
allowed_users={
"admin": "$2y$10$ZgcGQlsvMoMRmmW4Y.nUVuVHc.vOJsOA7iXAPXWPFy9DX2S7oeTDa", # nosemgrep: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash
"[email protected]": "$2y$10$ZgcGQlsvMoMRmmW4Y.nUVuVHc.vOJsOA7iXAPXWPFy9DX2S7oeTDa", # nosemgrep: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash
},
)

ui = MesopUI(auth=auth)


app = FastAgency(
provider=wf,
ui=MesopUI(),
ui=ui,
title="My FastAgency App",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

app = FastAgency(
provider=provider,
ui=MesopUI(),
ui=ui,
title="My FastAgency App",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

app = FastAgency(
provider=provider,
ui=MesopUI(),
ui=ui,
title="My FastAgency App",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@

from ..workflow import wf

ui = MesopUI()


app = FastAgency(
provider=wf,
ui=MesopUI(),
ui=ui,
title="My FastAgency App",
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

app = FastAgency(
provider=provider,
ui=MesopUI(),
ui=ui,
title="My FastAgency App",
)

Expand Down
Loading