mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-13 22:02:56 +00:00
upgraded
This commit is contained in:
parent
bd879d2605
commit
cf4b66db4d
@ -223,6 +223,20 @@ class LollmsApplication(LoLLMsCom):
|
||||
self.error("Couldn't add function call to context")
|
||||
trace_exception(ex)
|
||||
return None
|
||||
|
||||
def execute_function(self, code, client):
|
||||
function_call=json.loads(code)
|
||||
name = function_call["function_name"]
|
||||
for fc in self.config.mounted_function_calls:
|
||||
if fc["selected"]:
|
||||
if fc["name"] == name:
|
||||
fci = self.load_function_call(fc, client)
|
||||
if fci:
|
||||
output = fci["class"].execute(LollmsContextDetails(client),**function_call["function_parameters"])
|
||||
return output
|
||||
|
||||
|
||||
|
||||
def embed_function_call_in_prompt(self, original_prompt):
|
||||
"""Embeds function call descriptions in the system prompt"""
|
||||
function_descriptions = [
|
||||
|
@ -46,7 +46,6 @@ class LollmsTTI(LollmsSERVICE):
|
||||
negative_prompt: str = "",
|
||||
width=512,
|
||||
height=512,
|
||||
generation_engine=None,
|
||||
output_path = None) -> List[Dict[str, str]]:
|
||||
"""
|
||||
Generates images based on the given positive and negative prompts.
|
||||
|
Loading…
x
Reference in New Issue
Block a user