Fix/get multiple flows working (#355)

* Reduce log output

* Fix problems
This commit is contained in:
cybermaggedon 2025-04-29 00:06:41 +01:00 committed by GitHub
parent 9508ac6c69
commit 027b52cd7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 19 additions and 10 deletions

View file

@ -27,6 +27,8 @@ class FlowConfig:
self.config["flow-classes"][msg.class_name] = msg.class_definition
self.config.version += 1
await self.config.push()
return FlowResponse(
@ -39,6 +41,8 @@ class FlowConfig:
del self.config["flow-classes"][msg.class_name]
self.config.version += 1
await self.config.push()
return FlowResponse(
@ -135,6 +139,8 @@ class FlowConfig:
"interfaces": interfaces,
})
self.config.version += 1
await self.config.push()
return FlowResponse(
@ -186,6 +192,8 @@ class FlowConfig:
if msg.flow_id in self.config["flows"]:
del self.config["flows"][msg.flow_id]
self.config.version += 1
await self.config.push()
return FlowResponse(

View file

@ -173,7 +173,7 @@ class Processor(FlowProcessor):
o=Value(value=v.metadata.id, is_uri=True)
))
await self.emit_edges(
await self.emit_triples(
flow("triples"),
Metadata(
id=v.metadata.id,

View file

@ -72,7 +72,7 @@ class Processor(FlowProcessor):
for k, v in config.items()
}
def get_prices(self, prices, modelname):
def get_prices(self, modelname):
if modelname in self.prices:
model = self.prices[modelname]
@ -90,9 +90,7 @@ class Processor(FlowProcessor):
__class__.input_token_metric.inc(num_in)
__class__.output_token_metric.inc(num_out)
model_input_price, model_output_price = self.get_prices(
price_list, modelname
)
model_input_price, model_output_price = self.get_prices(modelname)
if model_input_price == None:
cost_per_call = f"Model Not Found in Price list"