Skip to content

Conversation

QIN2DIM
Copy link

@QIN2DIM QIN2DIM commented Mar 23, 2025

Motivation and Context

Fix a bug in reading environment variables in the simple-chatbot demo program.

How Has This Been Tested?

re-run uv run main.py

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@QIN2DIM QIN2DIM changed the title Update main.py fix: simple-chatbot env variable Mar 23, 2025
@Kludex
Copy link
Member

Kludex commented Mar 23, 2025

Does it say somewhere that it should be Groq?

@QIN2DIM
Copy link
Author

QIN2DIM commented Mar 23, 2025

@Kludex Hi,
I see GROQ_API_KEY in .env.example and the corresponding code used in get_response, there's nothing that has to say it has to be GROQ_API_KEY, just that it needs to be consistent on both sides or else os.getenv('xx') won't get the configuration.

url = "https://api.groq.com/openai/v1/chat/completions"

@dsp-ant
Copy link
Member

dsp-ant commented Mar 27, 2025

this is fixed by changing the env variable in .env.example

@dsp-ant dsp-ant closed this Mar 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants