Skip to content

Commit

Permalink
Update cookiecutter (#574)
Browse files Browse the repository at this point in the history
* Update cookiecutter generated files

* Update cookiecutter

* Fix embedding console UI docs

---------

Co-authored-by: Kumaran Rajendhiran <[email protected]>
  • Loading branch information
davorrunje and kumaranvpl authored Nov 13, 2024
1 parent 6403b84 commit b18c976
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 8 deletions.
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

0 comments on commit b18c976

Please sign in to comment.