Initial commit: SharePoint connector and ToothFairyAI integration
Some checks failed
CI - SharePoint Plugin with SonarQube / Test and SonarQube Analysis (push) Has been cancelled
Some checks failed
CI - SharePoint Plugin with SonarQube / Test and SonarQube Analysis (push) Has been cancelled
This commit is contained in:
23
setup_agent.py
Normal file
23
setup_agent.py
Normal file
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
from toothfairy_client import ToothFairyClient
|
||||
|
||||
# 1. Manually load the .env file so the script can see your keys
|
||||
load_dotenv()
|
||||
|
||||
# 2. Initialize the client
|
||||
client = ToothFairyClient()
|
||||
|
||||
# 3. Create the Tool pulling the URL from .env
|
||||
ngrok_url = os.getenv("NGROK_URL")
|
||||
|
||||
if not ngrok_url:
|
||||
print("❌ Error: NGROK_URL not found in .env file. Please add it and try again.")
|
||||
exit(1)
|
||||
|
||||
tool_id = client.create_search_tool(ngrok_url)
|
||||
print(f"✅ Tool created with ID: {tool_id}")
|
||||
|
||||
# 4. Create the Agent and attach the Tool
|
||||
agent_id = client.create_agent(tool_id)
|
||||
print(f"✅ Agent created with ID: {agent_id}")
|
||||
Reference in New Issue
Block a user