Renamed hf-api-token to api-token
This commit is contained in:
@@ -48,7 +48,7 @@ class Main:
|
|||||||
case "hf":
|
case "hf":
|
||||||
self._llm = HfLlmEngine(
|
self._llm = HfLlmEngine(
|
||||||
model_id=self._config.model,
|
model_id=self._config.model,
|
||||||
api_token=self._config.hf_api_token
|
api_token=self._config.api_token
|
||||||
)
|
)
|
||||||
case "test":
|
case "test":
|
||||||
self._llm = TestLLM()
|
self._llm = TestLLM()
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ class Config:
|
|||||||
help='LLM engine (default: local, env: SIA_LLM_ENGINE)'
|
help='LLM engine (default: local, env: SIA_LLM_ENGINE)'
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--hf-api-token',
|
'--api-token',
|
||||||
type=str,
|
type=str,
|
||||||
default=os.getenv('SIA_HF_API_TOKEN'),
|
default=os.getenv('SIA_API_TOKEN'),
|
||||||
help='Hugging Face access token (env: SIA_HF_API_TOKEN)'
|
help='API access token (env: SIA_API_TOKEN)'
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--model',
|
'--model',
|
||||||
@@ -127,9 +127,9 @@ class Config:
|
|||||||
return self.args.llm_engine
|
return self.args.llm_engine
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def hf_api_token(self) -> Optional[str]:
|
def api_token(self) -> Optional[str]:
|
||||||
"""Hugging Face access token."""
|
"""API access token."""
|
||||||
return self.args.hf_api_token
|
return self.args.api_token
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def model(self) -> str:
|
def model(self) -> str:
|
||||||
|
|||||||
Reference in New Issue
Block a user