Spaces:
Sleeping
Sleeping
File size: 1,042 Bytes
85c3f44 18c6f92 85c3f44 18c6f92 85c3f44 18c6f92 85c3f44 18c6f92 85c3f44 d0b708d 18c6f92 85c3f44 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | from openai import OpenAI
from dotenv import load_dotenv
from pathlib import Path
import json
readPath = Path(__file__).parent / "toolsDescriptions/tool_docs.json"
load_dotenv()
def main():
client = OpenAI()
with open(readPath, "r") as f:
tool_description = json.load(f)
instructions = "Tool usage guidance:\n" + json.dumps(tool_description, indent=2)
response = client.responses.create(
model= "gpt-4o",
tools= [{
"type": "mcp",
"server_label": "ScribeMCP",
"server_url": "https://eporath-scribe-mcp.hf.space/mcp",
"require_approval": "never",
}],
input = "Query the vulnerabilities table for the top 5 risky CVEs - KEV vulnerabilities and vulnerabilities with highest EPSS scores." +
"Take each query from the and Query the vulnerabilities table of to get the list of affected products."
#instructions = instructions
)
print(response.output_text)
if __name__ == "__main__":
main() |