55 56 @classmethod 57 def IS_CHANGED(s, deferred_evaluation): 58 if deferred_evaluation: 59 return randint(0, 1000) 60 else: 61 return "" 62
154 def __init__(self):
155 self.output_dir = folder_paths.get_temp_directory()
156 self.type = "temp"
157 self.prefix_append = "_temp_" + "".join(
158 random.choice("abcdefghijklmnopqrstupvxyz") for x in range(5)
159 )
160 self.compress_level = 1
161
45 # print(f"Error: Unsupported image format `{file_extension}`")
46 # return None, None, None
47
48 try:
49 response = requests.get(image_url)
50 if response.status_code != 200:
51 print(
52 f"Error: Failed to fetch image from URL with status code {response.status_code}"
38 OUTPUT_NODE = False 39 40 @classmethod 41 def IS_CHANGED(s, int_field): 42 return randint(0, 1000) 43 44 def run( 45 self,
71 return inputs
72
73 @classmethod
74 def IS_CHANGED(s, int_field):
75 return randint(0, 1000)
76
77 RETURN_TYPES = ("STRUCTURE",)
78 RETURN_NAMES = ("STRUCTURE",)
118 return inputs
119
120 @classmethod
121 def IS_CHANGED(s, int_field):
122 return randint(0, 1000)
123
124 RETURN_TYPES = ("STRUCTURE",)
125 RETURN_NAMES = ("STRUCTURE",)
165 headers = {
166 "Authorization": f"Bearer {api_key}",
167 }
168 try:
169 response = requests.get(
170 f"{base_url}/api/knowledge-bases/{knowledge_base_id}", headers=headers
171 )
172 except requests.exceptions.RequestException as e:
173 print(e)
174 return
12 url = f"http://127.0.0.1:{port}/v1/models"
13
14 try:
15 # Make the GET request
16 response = requests.get(url)
17
18 # Check if the request was successful
19 if response.status_code != 200:
41 url = "http://127.0.0.1:11434/api/tags" 42 43 try: 44 # Make the GET request 45 response = requests.get(url) 46 47 # Check if the request was successful 48 if response.status_code != 200: