fix: added permissions setting in the workflow (#273)

* fix: added permissions setting in the workflow

* fix: reformat the code of src/tools/retriever.py
This commit is contained in:
Willem Jiang 2025-06-03 11:48:51 +08:00 committed by GitHub
parent 0da52d41a7
commit db3e74629f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,9 @@ on:
pull_request: pull_request:
branches: [ '*' ] branches: [ '*' ]
permissions:
contents: read
jobs: jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -6,6 +6,9 @@ on:
pull_request: pull_request:
branches: [ '*' ] branches: [ '*' ]
permissions:
contents: read
jobs: jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -22,7 +22,9 @@ class RetrieverInput(BaseModel):
class RetrieverTool(BaseTool): class RetrieverTool(BaseTool):
name: str = "local_search_tool" name: str = "local_search_tool"
description: str = "Useful for retrieving information from the file with `rag://` uri prefix, it should be higher priority than the web search or writing code. Input should be a search keywords." description: str = (
"Useful for retrieving information from the file with `rag://` uri prefix, it should be higher priority than the web search or writing code. Input should be a search keywords."
)
args_schema: Type[BaseModel] = RetrieverInput args_schema: Type[BaseModel] = RetrieverInput
retriever: Retriever = Field(default_factory=Retriever) retriever: Retriever = Field(default_factory=Retriever)