Skip to content

Commit

Permalink
refactor:Using simpler/smaller package for accessing OpenAI.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Nov 26, 2023
1 parent 8b9d43c commit ae5513b
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Misc/LLMVision.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ of this software and associated documentation files (the "Software"), to deal
(* :Keywords: LLM, OpenAI, ChatGPT, Vision, Images, Interpretation*)
(* :Discussion: *)


(**************************************************************)
(* Importing packages (if needed) *)
(**************************************************************)

If[Length[DownValues[OpenAIRequest]] == 0,
Echo["OpenAIRequest.m", "Importing from GitHub:"];
Import["https://raw.githubusercontent.com/antononcube/MathematicaForPrediction/master/Misc/LLMVision.m"];
];

(**************************************************************)
(* Package definition *)
(**************************************************************)

BeginPackage["LLMVision`"];
(* Exported symbols added here with SymbolName::usage *)

Expand All @@ -47,8 +61,7 @@ of this software and associated documentation files (the "Software"), to deal

Begin["`Private`"];

Needs["ChristopherWolfram`OpenAILink`"];
Needs["ChristopherWolfram`OpenAILink`Request`"];
Needs["OpenAIRequest`"];

toVision = TemplateExpression[<|
"model" -> "gpt-4-vision-preview",
Expand Down

0 comments on commit ae5513b

Please sign in to comment.