Skip to content

Commit

Permalink
Bugfix: Fix internal failure for registered services that do not spec…
Browse files Browse the repository at this point in the history
…ify any models
  • Loading branch information
rhennigan committed Jan 12, 2024
1 parent e402f65 commit 1472faa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Source/Chatbook/Services.wl
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ getServiceModelList[ KeyValuePattern[ "Service" -> service_String ] ] :=

getServiceModelList[ service_String ] :=
With[ { models = $availableServices[ service, "CachedModels" ] },
If[ ListQ @ models,
Replace[
models,
getServiceModelList[ service, $availableServices[ service ] ]
{
{ } | None :> Missing[ "NoModelList" ],
list_List :> list,
_ :> getServiceModelList[ service, $availableServices[ service ] ]
}
]
];

Expand Down

0 comments on commit 1472faa

Please sign in to comment.