How to send url request on another website using Function Calls in OpenAI Assistant API? – API


Hello everyone, please help me with this.
url elif.com I have some history information on my website. I created an openai assistant chatbot and uploaded some pdfs into this chtabot for the file_search part and added a prompt to answer questions when the user asks about them, but it is also necessary to use function calls because this chtabot if the user can see the price information. I want it to run function calls and get the id of the product it asks for and send it to elif.com. I want the chatbot to display the value corresponding to the data from there. Can you help me urgently, I don’t know how to do it?

Heya! I’ve moved you from BUGS to just API for now.

What have you tried so far?

Have you checked out the Assistants docs?

What kind of server set-up do you have for the back-end? What language are you working in? Etc.

More details will help us get you pointed in the right direction!

Hello everyone, please help me with this.
url elif.com I have some history information on my website. I created an openai assistant chatbot and uploaded some pdfs into this chtabot for the file_search part and added a prompt to answer questions when the user asks about them, but it is also necessary to use function calls because this chtabot if the user can see the price information. I want it to run function calls and get the id of the product it asks for and send it to elif.com. I want the chatbot to display the value corresponding to the data from there. Can you help me urgently, I don’t know how to do it?

Yes, I created a chatbo by looking at those documents. The chatbot answers the questions well. I’m just trying to add function calls, but I still haven’t figured out how to send the tour code id that the chatbot received to elif.com with these function calls. I tried to try a few videos I watched, but it didn’t work.

I am attaching one of the videos I watched and one of the codes I looked at. I would be very happy if you can help me.

This link is important, but I don’t know how I added the URL to the assistant API to send and receive requests to another website. I have already created an assistant in my account and added function calls to it, but I couldn’t understand how to make these redirects from the outside.

Could you please check it and maybe you can help me?

https://medium.com/the-modern-scientist/everything-you-need-to-know-about-openai-function-calling

my account assitan api requairements

Okay, it sounds like you want help writing the code for the function?

That depends on your server, language, etc.

Or am I misunderstanding?

If I want to know the price after asking questions and answers to my assistant about the documents in the PDF at GPT, I will either enter the tour code directly or when I write the name of the tour and ask for the code, after GPT gives me the tour code, this tour code information must be kept in the background when I want to find out the price. I want to send it to this address /www.acente2demo.com/chatgpt.php and extract the price information, whatever its value is in that tour code, and show it in GPT.

The following is a gpt assistant and I want to retrieve the data I want from other APIs with function calls as I mentioned above.

this my code

Okay, so did you set up the function to go to that page? Is it locked down somehow? (Would be a good idea…)

Are you having trouble creating the actual function code to grab the price information in your chatgpt.php?

This link is just a test url and it only contains date information. I created it so that if I can send a turcode parameter here, it will return anything to me, as in the picture below.

I’m sending you the picture of the function, I just wrote that much, so I don’t know exactly how to go to that page and write it into the function.



1 Like

Ah, okay, I think I have grokked your problem. Finally. Apologies … and correct me if I’m wrong.

What I think is happening is that your main script with the OpenAI client is in Python and you’re trying to call a PHP script. You’ll want the function code in with the rest of main.py… I don’t think you can call external PHP scripts, but you could create the OpenAI client in your PHP script and have the function there…

So, you can rewrite it so that the function code is in Python or make it all PHP. Does that make sense?

Note, I could be wrong as I don’t use Assistants API frequently!

actually ı have php code for my call asistant but ı dont use function calls include web site link

can you say me how ı can function calls from openai assitant another web link ist doesn’t important php url etc



Source link

Leave a Comment