nikeshn commited on
Commit
965825a
·
verified ·
1 Parent(s): 37ae25d

Upload 2 files

Browse files
Files changed (1) hide show
  1. src/config.py +10 -1
src/config.py CHANGED
@@ -4,6 +4,10 @@ from typing import Literal
4
  from pydantic import field_validator
5
  from pydantic_settings import BaseSettings, SettingsConfigDict
6
 
 
 
 
 
7
  class Settings(BaseSettings):
8
  model_config = SettingsConfigDict(
9
  case_sensitive=False,
@@ -27,8 +31,13 @@ class Settings(BaseSettings):
27
  knowledge_dir: str = ""
28
  rate_limit_per_minute: int = 40
29
  # Cloudflare Worker URL for persistent analytics
30
- # Set this in HF Space secrets as: CLOUDFLARE_WORKER_URL=https://steep-haze-e1f8.nikeshn.workers.dev
31
  cloudflare_worker_url: str = ""
 
 
 
 
 
32
 
33
  @field_validator("max_results")
34
  @classmethod
 
4
  from pydantic import field_validator
5
  from pydantic_settings import BaseSettings, SettingsConfigDict
6
 
7
+ # Single source of truth for the deployed version. app.py, admin.py and all
8
+ # outbound User-Agent strings read this constant - never hardcode versions elsewhere.
9
+ LIBBEE_VERSION = "3.8.0"
10
+
11
  class Settings(BaseSettings):
12
  model_config = SettingsConfigDict(
13
  case_sensitive=False,
 
31
  knowledge_dir: str = ""
32
  rate_limit_per_minute: int = 40
33
  # Cloudflare Worker URL for persistent analytics
34
+ # Set in HF Space secrets (never hardcode the URL in this repository).
35
  cloudflare_worker_url: str = ""
36
+ # Shared-secret bearer token for the Worker analytics endpoints (/log, /analytics*, /reports*).
37
+ # Must match the ANALYTICS_TOKEN secret configured on the Cloudflare Worker.
38
+ cloudflare_worker_token: str = ""
39
+ # Contact for polite-pool identification with open scholarly APIs (OpenAlex, Unpaywall, Crossref).
40
+ contact_email: str = "libse@ku.ac.ae"
41
 
42
  @field_validator("max_results")
43
  @classmethod