Skip to content

Commit

Permalink
added vision and image gen attributes to LLM
Browse files Browse the repository at this point in the history
  • Loading branch information
jjuliano committed Oct 19, 2024
1 parent 9408e44 commit 82340b2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
4 changes: 4 additions & 0 deletions deps/pkl/APIServerRequest.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ function header(name: String): String =
headers[name].base64Decoded
else
""
// For consistency
function path(): String = path
function method(): String = method
function filetype(): String = filetype
9 changes: 8 additions & 1 deletion deps/pkl/LLM.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ import "package://pkg.pkl-lang.org/pkl-go/[email protected]#/go.pkl"
resources: Mapping<String, ResourceChat>?

class ResourceChat {
model: String = "llama3.1"
model: String = "llama3.2"
prompt: String
visionModel: Boolean? = false
imageGeneration: Boolean? = false
generatedFile: String?
jsonResponse: Boolean? = false
jsonResponseKeys: Listing<String>?
response: String?
Expand All @@ -30,3 +33,7 @@ function resource(id: String): ResourceChat =
function response(id: String): String = resource(id).response
function prompt(id: String): String = resource(id).prompt
function jsonResponse(id: String): Boolean = resource(id).jsonResponse
function jsonResponseKeys(id: String): Boolean = resource(id).jsonResponseKeys
function visionModel(id: String): Boolean = resource(id).visionModel
function imageGeneration(id: String): Boolean = resource(id).imageGeneration
function generatedFile(id: String): String = resource(id).generatedFile
6 changes: 6 additions & 0 deletions gen/llm/ResourceChat.pkl.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 82340b2

Please sign in to comment.