Skip to content
site logo mobile

Forum in maintenance, we will back soon 🙂

First try with the ...
 
Notifications
Clear all

First try with the AI Agent Guide

3 Posts
3 Users
1 Likes
9 Views
 Alan
(@apasho)
Posts: 1
New Member
Topic starter
 

To get the code to work, under

from dotenv import load_dotenv

I added:

from actions import get_response_time
from prompts import system_prompt
from json_helpers import extract_json
import json
I added the json_helpers.py file from the repository.
 
And in the loop, this function is causing an error, json_function = extract_json(response). I replaced it with the following code to simulate the output:
 
    json_function = [{
        'function_name': 'get_response_time',
        'function_parms': {'url': 'learnwithhasan.com'}
    }]    
 
Now the agent is able to get the site response time.
 
 
Posted : 05/01/2024 10:51 pm
Topic Tags
SSAdvisor
(@ssadvisor)
Posts: 927
Noble Member
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
 

@apasho you haven't given a clear picture of what you need help with. Please provide the full code for the project using a public GitHub repository.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
Schedule 1-on-1 help
Join me on Slack

 
Posted : 05/01/2024 11:04 pm
Hasan Aboul Hasan
(@admin)
Posts: 957
Member Admin
Premium Member
Pythonista Prodigy Badge
Prompt Engineer
API Entrepreneur
Power Member
 

@ssadvisor I think he is sharing his results. @apasho yes?

 

 
Posted : 05/02/2024 4:22 pm
Share: