Skip to content

Latest commit

 

History

History

extract-information-from-unstructured-data

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Steps to run the sample

1. Configuring the Config.toml file

  1. Create a Config.toml file in the root directory and add the below content.
openAIKey = "<OPEN_AI_KEY>"
  1. Create an OpenAI account and obtain an API key and replace with <OPEN_AI_KEY>.

2. Running the sample

Run the following command from the root directory of the sample.

$ bal run

3. Test the sample

$ curl -X POST http://localhost:8080/api/reviews/summary -H "Content-Type: application/json" -d '{"reviews":["I recently ordered a laptop and it was in very good condition and it was delivered on time. But there were some software glitches and I couldn'\''t find enough instructions to troubleshoot them. Would be great if they provided more detailed manuals.","The smartphone I ordered arrived with a damaged screen. They need to be careful when packaging.","Extremely satisfied with my orders. Would suggest this place to anyone.","Everything is great about them expect some deliveries take too long. Would suggest improving shipping speed to reduce delays."]}'