-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from frazik-main/34-use-amplifygpt-to-update-r…
…eadmemd 34 use amplifygpt to update readmemd
- Loading branch information
Showing
15 changed files
with
646 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
--prompt-- | ||
{"role": "user", "content": """""" Using the above text, please answer the following question: "best cars" -- if the question cannot be answered using the text, please summarize the text."} | ||
--response-- | ||
The text does not provide any information about "best cars." | ||
--prompt-- | ||
{"role": "user", "content": """Best Cars for 2023 and 2024 | U.S. News Cars New Cars New Cars for Sale Research Cars Best Price Program New Car Rankings Car Deals This Month Compare Cars Calculate Car Payment Used Cars Used Cars for Sale Certified Pre-Owned Cars for Sale Used Car Rankings Used Car Deals This Month Compare Used Cars Calculate Used Car Payment Car Rankings New Car Rankings Used Car Rankings Best Cars for the Money Best Cars for Families Best Vehicle Brands Cars for Sale New Cars for Sale Used Cars for Sale Certified Pre-Owned Cars for Sale Electric Vehicles Advice Advice Features Car Insurance Loans & Leasing Motorcycles ATVs UTVs Best Car Deals New Car Deals Used Car Deals Lease Car Deals Sell Your Car Car Selling Advice Get Instant Cash Offer AcuraAlfa RomeoAston MartinAudiBMWBuickCadillacChevroletChryslerDodgeFerrariFIATFordGenesisGMCHondaHUMMERHyundaiInfinitiIsuzuJaguarJeepKiaLamborghiniLand RoverLexusLincolnLotusMaseratiMazdaMercedes-BenzMercuryMINIMitsubishiNissanPontiacPorscheRamSaabSaturnScionSmartSubaruSuzukiTeslaToyotaVolkswagenVolvoMake Model Year Sign In Cars Rankings Cars Best Cars for 2023 and 2024 Find the best cars then compare models and read our car reviews, which provide the consensus opinion from the automotive press. You can also view new car prices in your area. Read how we rank new cars New Car Rankings Used Car Rankings Best Cars for the Money Best Car for Families Best Vehicle Brands New Car Rankings Used Car Rankings Best Cars for the Money Best Car for Families Best Vehicle Brands Cars SUVs Trucks Vans Hybrids Electric Small Cars Small Cars #1 2023 Honda Civic Type R #2 2024 Acura Integra #3 2023 Honda Civic See full rankings Luxury Small Cars #1 2024 Acura Integra #2 2023 Audi A4 #2 2023 Mercedes-Benz C-Class See full rankings Advertisement Hatchbacks #1 2023 Honda Civic Type R #2 2023 Honda Civic #3 2023 Mazda Mazda3 See full rankings Compact Cars #1 2023 Honda Civic #2 2023 Mazda Mazda3 #3 2023 Hyundai Elantra See full rankings Subcompact Cars #1 2024 MINI Cooper #2 2023 Kia Rio #3 2023 Nissan Versa See full rankings Advertisement Midsize Cars Midsize Cars #1 2023 Honda Accord #2 2023 Kia K5 #3 2023 Toyota Camry See full rankings Luxury Midsize Cars #1 2023 Mercedes-Benz E-Class #2 2023 BMW 5-Series #3 2023 Genesis G80 See full rankings Large Cars Large Cars #1 2023 Dodge Charger #2 2023 Nissan Maxima #3 2023 Chrysler 300 See full rankings Luxury Large Cars #1 2023 Genesis G90 #2 2023 Audi A7 #3 2023 Mercedes-Benz S-Class See full rankings Advertisement Sports Cars Sports Cars #1 2023 Subaru BRZ #2 2024 Toyota GR86 #3 2024 Ford Mustang See full rankings Luxury Sports Cars #1 2023 Chevrolet Corvette #2 2023 Audi R8 #3 2023 Porsche 911 See full rankings Advertisement Performance Cars Sport Compact Cars #1 2023 Honda Civic Type R #2 2023 Hyundai Elantra N #3 2023 Volkswagen GTI See full rankings Small Sport Sedans #1 2024 Acura Integra Type S #2 2023 Cadillac CT4-V Blackwing #3 2023 Audi S5 See full rankings Midsize Sport Sedans #1 2023 Cadillac CT5-V Blackwing #2 2023 Audi S6 #2 2023 BMW M5 See full rankings Large Sport Sedans #1 2023 Audi S8 #2 2023 Audi RS 7 #3 2023 Audi S7 See full rankings Convertibles Convertibles #1 2024 Ford Mustang #1 2023 Mazda MX-5 Miata #3 2024 Chevrolet Camaro See full rankings Luxury Convertibles #1 2023 Chevrolet Corvette #2 2023 Porsche 911 #2 2023 Porsche Boxster See full rankings Wagons Wagons #1 2023 Audi A6 Allroad #2 2023 Volvo V60 #3 2023 Audi A4 Allroad See full rankings Hybrid Cars Hybrid Cars #1 2023 Honda Accord Hybrid #1 2023 Hyundai Sonata Hybrid #3 2023 Toyota Camry Hybrid See all Hybrid Cars Advertisement Advertisement Browse Cars Small Cars Midsize Cars Large Cars SUVs Crossovers Trucks Hybrids Vans Electric Luxury Sports Cars Convertibles Browse all models Advertisement Advertisement New Cars New Cars for Sale Research Cars Best Price Program New Car Rankings Car Deals This Month Compare Cars Calculate Car Payment Used Cars Used Cars for Sale Certified Pre-Owned Cars for Sale Used Car Rankings Insurance Cheapest Car Insurance Companies Best Car Insurance Companies Car Rankings New Car Rankings Used Car Rankings Best Cars for the Money Best Cars for Families Best Vehicle Brands Advice Best Car Deals New Car Deals Used Car Deals Lease Car Deals How We Rank New Cars Used Cars Cars for Sale New Cars for Sale Used Cars for Sale Certified Pre-Owned Cars for Sale Stock photography by izmostock. © 1986 - 2023 Autodata, Inc. dba Chrome Data New Cars Used Cars Insurance Car Rankings Advice Best Car Deals How We Rank Cars for Sale Stock photography by izmostock. © 1986 - 2023 Autodata, Inc. dba Chrome Data About U.S. News Contact Press Advertise Newsletters Jobs Site Map Store Copyright 2023 © U.S. News & World Report L.P.Terms & Conditions/Privacy Policy and Cookie Notice/US State Privacy Notice/Your Privacy Choices California Consumer Privacy Act (CCPA) Opt-Out Icon""" Using the above text, please answer the following question: "best cars" -- if the question cannot be answered using the text, please summarize the text."} | ||
--response-- | ||
According to the provided text, the "best cars" for 2023 and 2024 are listed in various categories such as small cars, luxury small cars, hatchbacks, compact cars, subcompact cars, midsize cars, luxury midsize cars, large cars, luxury large cars, sports cars, luxury sports cars, performance cars, convertibles, wagons, and hybrid cars. The rankings include popular models like the Honda Civic, Acura Integra, Audi A4, Mercedes-Benz E-Class, Dodge Charger, Genesis G90, Subaru BRZ, Chevrolet Corvette, Honda Accord Hybrid, and many more. | ||
--prompt-- | ||
{"role": "user", "content": """""" Using the above text, please answer the following question: "best cars" -- if the question cannot be answered using the text, please summarize the text."} | ||
--response-- | ||
The provided text does not mention anything about "best cars" or provide any relevant information regarding that topic. | ||
--prompt-- | ||
{"role": "user", "content": """Best Cars for 2023 and 2024 | U.S. News Cars New Cars New Cars for Sale Research Cars Best Price Program New Car Rankings Car Deals This Month Compare Cars Calculate Car Payment Used Cars Used Cars for Sale Certified Pre-Owned Cars for Sale Used Car Rankings Used Car Deals This Month Compare Used Cars Calculate Used Car Payment Car Rankings New Car Rankings Used Car Rankings Best Cars for the Money Best Cars for Families Best Vehicle Brands Cars for Sale New Cars for Sale Used Cars for Sale Certified Pre-Owned Cars for Sale Electric Vehicles Advice Advice Features Car Insurance Loans & Leasing Motorcycles ATVs UTVs Best Car Deals New Car Deals Used Car Deals Lease Car Deals Sell Your Car Car Selling Advice Get Instant Cash Offer AcuraAlfa RomeoAston MartinAudiBMWBuickCadillacChevroletChryslerDodgeFerrariFIATFordGenesisGMCHondaHUMMERHyundaiInfinitiIsuzuJaguarJeepKiaLamborghiniLand RoverLexusLincolnLotusMaseratiMazdaMercedes-BenzMercuryMINIMitsubishiNissanPontiacPorscheRamSaabSaturnScionSmartSubaruSuzukiTeslaToyotaVolkswagenVolvoMake Model Year Sign In Cars Rankings Cars Best Cars for 2023 and 2024 Find the best cars then compare models and read our car reviews, which provide the consensus opinion from the automotive press. You can also view new car prices in your area. Read how we rank new cars New Car Rankings Used Car Rankings Best Cars for the Money Best Car for Families Best Vehicle Brands New Car Rankings Used Car Rankings Best Cars for the Money Best Car for Families Best Vehicle Brands Cars SUVs Trucks Vans Hybrids Electric Small Cars Small Cars #1 2023 Honda Civic Type R #2 2024 Acura Integra #3 2023 Honda Civic See full rankings Luxury Small Cars #1 2024 Acura Integra #2 2023 Audi A4 #2 2023 Mercedes-Benz C-Class See full rankings Advertisement Hatchbacks #1 2023 Honda Civic Type R #2 2023 Honda Civic #3 2023 Mazda Mazda3 See full rankings Compact Cars #1 2023 Honda Civic #2 2023 Mazda Mazda3 #3 2023 Hyundai Elantra See full rankings Subcompact Cars #1 2024 MINI Cooper #2 2023 Kia Rio #3 2023 Nissan Versa See full rankings Advertisement Midsize Cars Midsize Cars #1 2023 Honda Accord #2 2023 Kia K5 #3 2023 Toyota Camry See full rankings Luxury Midsize Cars #1 2023 Mercedes-Benz E-Class #2 2023 BMW 5-Series #3 2023 Genesis G80 See full rankings Large Cars Large Cars #1 2023 Dodge Charger #2 2023 Nissan Maxima #3 2023 Chrysler 300 See full rankings Luxury Large Cars #1 2023 Genesis G90 #2 2023 Audi A7 #3 2023 Mercedes-Benz S-Class See full rankings Advertisement Sports Cars Sports Cars #1 2023 Subaru BRZ #2 2024 Toyota GR86 #3 2024 Ford Mustang See full rankings Luxury Sports Cars #1 2023 Chevrolet Corvette #2 2023 Audi R8 #3 2023 Porsche 911 See full rankings Advertisement Performance Cars Sport Compact Cars #1 2023 Honda Civic Type R #2 2023 Hyundai Elantra N #3 2023 Volkswagen GTI See full rankings Small Sport Sedans #1 2024 Acura Integra Type S #2 2023 Cadillac CT4-V Blackwing #3 2023 Audi S5 See full rankings Midsize Sport Sedans #1 2023 Cadillac CT5-V Blackwing #2 2023 Audi S6 #2 2023 BMW M5 See full rankings Large Sport Sedans #1 2023 Audi S8 #2 2023 Audi RS 7 #3 2023 Audi S7 See full rankings Convertibles Convertibles #1 2024 Ford Mustang #1 2023 Mazda MX-5 Miata #3 2024 Chevrolet Camaro See full rankings Luxury Convertibles #1 2023 Chevrolet Corvette #2 2023 Porsche 911 #2 2023 Porsche Boxster See full rankings Wagons Wagons #1 2023 Audi A6 Allroad #2 2023 Volvo V60 #3 2023 Audi A4 Allroad See full rankings Hybrid Cars Hybrid Cars #1 2023 Honda Accord Hybrid #1 2023 Hyundai Sonata Hybrid #3 2023 Toyota Camry Hybrid See all Hybrid Cars Advertisement Advertisement Browse Cars Small Cars Midsize Cars Large Cars SUVs Crossovers Trucks Hybrids Vans Electric Luxury Sports Cars Convertibles Browse all models Advertisement Advertisement New Cars New Cars for Sale Research Cars Best Price Program New Car Rankings Car Deals This Month Compare Cars Calculate Car Payment Used Cars Used Cars for Sale Certified Pre-Owned Cars for Sale Used Car Rankings Insurance Cheapest Car Insurance Companies Best Car Insurance Companies Car Rankings New Car Rankings Used Car Rankings Best Cars for the Money Best Cars for Families Best Vehicle Brands Advice Best Car Deals New Car Deals Used Car Deals Lease Car Deals How We Rank New Cars Used Cars Cars for Sale New Cars for Sale Used Cars for Sale Certified Pre-Owned Cars for Sale Stock photography by izmostock. © 1986 - 2023 Autodata, Inc. dba Chrome Data New Cars Used Cars Insurance Car Rankings Advice Best Car Deals How We Rank Cars for Sale Stock photography by izmostock. © 1986 - 2023 Autodata, Inc. dba Chrome Data About U.S. News Contact Press Advertise Newsletters Jobs Site Map Store Copyright 2023 © U.S. News & World Report L.P.Terms & Conditions/Privacy Policy and Cookie Notice/US State Privacy Notice/Your Privacy Choices California Consumer Privacy Act (CCPA) Opt-Out Icon""" Using the above text, please answer the following question: "best cars" -- if the question cannot be answered using the text, please summarize the text."} | ||
--response-- | ||
According to the provided text, the best cars for 2023 and 2024 are listed in different categories such as small cars, luxury small cars, hatchbacks, compact cars, subcompact cars, midsize cars, luxury midsize cars, large cars, luxury large cars, sports cars, luxury sports cars, performance cars, convertibles, wagons, hybrid cars, and electric cars. The text provides rankings for each category and mentions specific models that are considered the best in their respective categories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
70 changes: 70 additions & 0 deletions
70
lib/src/main/java/com/frazik/instructgpt/logging/ChatLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
package com.frazik.instructgpt.logging; | ||
|
||
import lombok.extern.slf4j.Slf4j; | ||
import org.apache.commons.io.FileUtils; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.Map; | ||
@SuppressWarnings("ResultOfMethodCallIgnored") | ||
@Slf4j | ||
public class ChatLogger { | ||
|
||
private final File currentFolder; | ||
private final File promptFile; | ||
private final File summaryFile; | ||
public ChatLogger() { | ||
this.currentFolder = new File("chat-logs/" + System.getProperty("sun.java.command")); | ||
this.promptFile = new File(currentFolder, "prompt.log"); | ||
this.summaryFile = new File(currentFolder, "summary.log"); | ||
if (promptFile.exists()) { | ||
promptFile.delete(); | ||
} | ||
if (summaryFile.exists()) { | ||
summaryFile.delete(); | ||
} | ||
if (!currentFolder.exists()) { | ||
currentFolder.mkdirs(); | ||
} | ||
} | ||
public void write(List<Map<String, String>> fullPrompt, String response) { | ||
try { | ||
FileUtils.write(promptFile, "\n--prompt--\n", "UTF-8", true); | ||
for (Map<String, String> prompt : fullPrompt) { | ||
for (Map.Entry<String, String> entry : prompt.entrySet()) { | ||
String key = entry.getKey(); | ||
String value = entry.getValue(); | ||
FileUtils.write(promptFile, key + ": " + value + "\n", "UTF-8", true); | ||
} | ||
} | ||
FileUtils.write(promptFile, "\n--response--\n", "UTF-8", true); | ||
FileUtils.write(promptFile, response, "UTF-8", true); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
|
||
public void write(String[] prompts, String response) { | ||
try { | ||
FileUtils.write(summaryFile, "\n--prompt--\n", "UTF-8", true); | ||
for (String prompt : prompts) { | ||
FileUtils.write(summaryFile, prompt, "UTF-8", true); | ||
} | ||
FileUtils.write(summaryFile, "\n--response--\n", "UTF-8", true); | ||
// Write response to response.log | ||
FileUtils.write(summaryFile, response, "UTF-8", true); | ||
} catch (IOException e) { | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
|
||
private File getAndInitialize(String x) { | ||
File promptFile = new File(currentFolder, x + ".log"); | ||
if (promptFile.exists()) { | ||
promptFile.delete(); | ||
} | ||
return promptFile; | ||
} | ||
|
||
} |
Oops, something went wrong.