Kcpele
January 16, 2025, 2:58pm
1
i tried adding my local agent to the studio.attomaker but as soon as I type in the prompt and hit enter I get back
TypeError: Failed to fetch
immediately. when I check the terminal there was no errors
then I checked my browser
page-0862d082844ee8cf.js:1
POST http://localhost:8001/api/coincashew-agent net::ERR_BLOCKED_BY_CLIENT
1 Like
It seems like you are getting blocked by CORS here. Make sure your FastAPI endpoint has CORS enabled! See my example here:
from github_agent import github_agent, GitHubDeps
# Load environment variables
load_dotenv()
# Initialize FastAPI app
app = FastAPI()
security = HTTPBearer()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Supabase setup
supabase: Client = create_client(
os.getenv("SUPABASE_URL"),
Kcpele
January 17, 2025, 8:15am
3
That’s what i have. I made use of your template, i am suspecting my browser
1 Like
Yes it could be an ad blocker or something similar! Especially if you are using Brave.