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.2 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Chess Game Example
  2. An example with two chess player agents that executes its own tools to demonstrate tool use and reflection on tool use.
  3. ## Running the example
  4. ### Prerequisites
  5. First, you need a shell with AutoGen core and required dependencies installed.
  6. ```bash
  7. pip install "autogen-core==0.4.0.dev13" "autogen-ext[openai,azure]==0.4.0.dev13" "chess"
  8. ```
  9. ### Using Azure OpenAI API
  10. For Azure OpenAI API, you need to set the following environment variables:
  11. ```bash
  12. export OPENAI_API_TYPE=azure
  13. export AZURE_OPENAI_API_ENDPOINT=your_azure_openai_endpoint
  14. export AZURE_OPENAI_API_VERSION=your_azure_openai_api_version
  15. ```
  16. By default, we use Azure Active Directory (AAD) for authentication.
  17. You need to run `az login` first to authenticate with Azure.
  18. You can also
  19. use API key authentication by setting the following environment variables:
  20. ```bash
  21. export AZURE_OPENAI_API_KEY=your_azure_openai_api_key
  22. ```
  23. This requires azure-identity installation:
  24. ```bash
  25. pip install azure-identity
  26. ```
  27. ### Using OpenAI API
  28. For OpenAI API, you need to set the following environment variables.
  29. ```bash
  30. export OPENAI_API_TYPE=openai
  31. export OPENAI_API_KEY=your_openai_api_key
  32. ```