mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-13 12:10:18 +00:00
agent
: fix tools setup
This commit is contained in:
parent
5c414a3335
commit
30bd00bcf7
@ -3,7 +3,8 @@ FROM python:3.12-slim
|
||||
RUN python -m pip install --upgrade pip && \
|
||||
apt clean cache
|
||||
|
||||
COPY requirements.txt tools/*.py /root/
|
||||
COPY requirements.txt /root/
|
||||
COPY tools /root/tools
|
||||
WORKDIR /root
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
|
@ -70,6 +70,7 @@ async def brave_search(*, query: str) -> List[Dict]:
|
||||
if not response.ok:
|
||||
raise Exception(response.text)
|
||||
response.raise_for_status()
|
||||
results = list(itertools.islice(extract_results(response.json()), max_results))
|
||||
print(json.dumps(dict(query=query, response=response, results=results), indent=2))
|
||||
response_json = response.json()
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user