You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Streamlit AgentChat Sample Application
  2. This is a sample AI chat assistant built with [Streamlit](https://streamlit.io/)
  3. ## Setup
  4. Install the `streamlit` package with the following command:
  5. ```bash
  6. pip install streamlit
  7. ```
  8. To use Azure OpenAI models or models hosted on OpenAI-compatible API endpoints,
  9. you need to install the `autogen-ext[openai,azure]` package. You can install it with the following command:
  10. ```bash
  11. pip install "autogen-ext[openai,azure]"
  12. # pip install "autogen-ext[openai]" for OpenAI models
  13. ```
  14. Create a new file named `model_config.yml` in the the same directory as the script
  15. to configure the model you want to use.
  16. For example, to use `gpt-4o-mini` model from Azure OpenAI, you can use the following configuration:
  17. ```yml
  18. provider: autogen_ext.models.openai.AzureOpenAIChatCompletionClient
  19. config:
  20. azure_deployment: "gpt-4o-mini"
  21. model: gpt-4o-mini
  22. api_version: REPLACE_WITH_MODEL_API_VERSION
  23. azure_endpoint: REPLACE_WITH_MODEL_ENDPOINT
  24. api_key: REPLACE_WITH_MODEL_API_KEY
  25. ```
  26. For more information on how to configure the model and use other providers,
  27. please refer to the [Models documentation](https://microsoft.github.io/autogen/stable/user-guide/agentchat-user-guide/tutorial/models.html).
  28. ## Run
  29. Run the following command to start the web application:
  30. ```bash
  31. streamlit run main.py
  32. ```