agent
: fix tools setup
This commit is contained in:
parent
5c414a3335
commit
30bd00bcf7
2 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,8 @@ FROM python:3.12-slim
|
||||||
RUN python -m pip install --upgrade pip && \
|
RUN python -m pip install --upgrade pip && \
|
||||||
apt clean cache
|
apt clean cache
|
||||||
|
|
||||||
COPY requirements.txt tools/*.py /root/
|
COPY requirements.txt /root/
|
||||||
|
COPY tools /root/tools
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ async def brave_search(*, query: str) -> List[Dict]:
|
||||||
if not response.ok:
|
if not response.ok:
|
||||||
raise Exception(response.text)
|
raise Exception(response.text)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
results = list(itertools.islice(extract_results(response.json()), max_results))
|
response_json = response.json()
|
||||||
print(json.dumps(dict(query=query, response=response, results=results), indent=2))
|
results = list(itertools.islice(extract_results(response_json), max_results))
|
||||||
|
print(json.dumps(dict(query=query, response=response_json, results=results), indent=2))
|
||||||
return results
|
return results
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue