5#include "CoreMinimal.h"
6#include "ChatGPT/BaseService.h"
8#include "WeatherService.generated.h"
31 double Temperature{0.0};
34 TArray<FString> Weather_Descriptions;
58 virtual bool Init(
const OpenAI::ServiceSecrets& Secrets)
override;
59 virtual FString Name()
const override {
return "Weather"; }
60 virtual FString TooltipDescription()
const override {
return "Weather from https://weatherstack.com"; }
61 virtual FString Description()
const override;
62 virtual FString FunctionName()
const override;
63 virtual void Call(
const TSharedPtr<FJsonObject>& Args,
const FString& ToolID)
override;
66 virtual FString MakeFunction()
const;
71 bool MakeRequestURL(
const TSharedPtr<FJsonObject>& ArgsJson, FString& WeatherRequestURL)
const;
72 void OnRequestCompleted(FHttpRequestPtr Request, FHttpResponsePtr Response,
bool WasSuccessful);
73 void SendError(
const FString& ErrorMessage);
Definition: BaseService.h:16
Definition: WeatherService.h:54
Definition: WeatherService.h:24
Definition: WeatherService.h:39
Definition: WeatherService.h:12