Skip to content

Forum in maintenance, we will back soon 🙂

First try with the ...
 
Notifications
Clear all

[Solved] First try with the AI Agent Guide

4 Posts
3 Users
4 Reactions
70 Views
 Alan
(@apasho)
Posts: 3
Active 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: 1127
Noble 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: 1185
Member Admin
 

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

 

 
Posted : 05/02/2024 4:22 pm
 Alan
(@apasho)
Posts: 3
Active Member
Topic starter
 

@admin Yes, I am sharing what modifications I made to get the code to work as it did in the video.

 
Posted : 05/04/2024 6:35 pm
Share:
[the_ad_group id=”312″]