Use environment variable for Athina logging URL (#7628)

* Use environment variable for Athina logging URL

* Added to docs as well

* Changed the env var name
This commit is contained in:
vivek-athina 2025-01-10 21:17:12 +05:30 • committed by GitHub
parent c10ae8879e
commit 8e2653c609
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -79,6 +79,17 @@ Following are the allowed fields in metadata, their types, and their description
* `expected_response: Optional[str]` - This is the reference response to compare against for evaluation purposes. This is useful for segmenting inference calls by expected response.
* `user_query: Optional[str]` - This is the user's query. For conversational applications, this is the user's last message.
## Using a self hosted deployment of Athina
If you are using a self hosted deployment of Athina, you will need to set the `ATHINA_BASE_URL` environment variable to point to your self hosted deployment.
```python
...
os.environ["ATHINA_BASE_URL"]= "http://localhost:9000"
...
```
## Support & Talk with Athina Team
- [Schedule Demo 👋](https://cal.com/shiv-athina/30min)

View file

@ -12,7 +12,7 @@ class AthinaLogger:
"athina-api-key": self.athina_api_key,
"Content-Type": "application/json",
}
self.athina_logging_url = "https://log.athina.ai/api/v1/log/inference"
self.athina_logging_url = os.getenv("ATHINA_BASE_URL", "https://log.athina.ai") + "/api/v1/log/inference"
self.additional_keys = [
"environment",
"prompt_slug",