goose-py 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
goose/agent.py
CHANGED
@@ -125,14 +125,20 @@ class AgentResponse[R: BaseModel](BaseModel):
|
|
125
125
|
def duration_ms(self) -> int:
|
126
126
|
return int((self.end_time - self.start_time).total_seconds() * 1000)
|
127
127
|
|
128
|
+
@computed_field
|
129
|
+
@property
|
130
|
+
def input_cost(self) -> float:
|
131
|
+
return self.INPUT_CENTS_PER_MILLION_TOKENS[self.model] * self.input_tokens
|
132
|
+
|
133
|
+
@computed_field
|
134
|
+
@property
|
135
|
+
def output_cost(self) -> float:
|
136
|
+
return self.OUTPUT_CENTS_PER_MILLION_TOKENS[self.model] * self.output_tokens
|
137
|
+
|
128
138
|
@computed_field
|
129
139
|
@property
|
130
140
|
def total_cost(self) -> float:
|
131
|
-
|
132
|
-
output_cost = (
|
133
|
-
self.OUTPUT_CENTS_PER_MILLION_TOKENS[self.model] * self.output_tokens
|
134
|
-
)
|
135
|
-
return input_cost + output_cost
|
141
|
+
return self.input_cost + self.output_cost
|
136
142
|
|
137
143
|
|
138
144
|
class Agent:
|
@@ -1,8 +1,8 @@
|
|
1
1
|
goose/__init__.py,sha256=wUKxLPSbhPl5Vv4HRK3wuWwanUtpgbe8toT31cM0ZLU,144
|
2
|
-
goose/agent.py,sha256=
|
2
|
+
goose/agent.py,sha256=5oUoVqvG_qTnsSQyzGjEbhnyk5mswQaoHTXF5SaIrg8,5568
|
3
3
|
goose/errors.py,sha256=-0OyZQJWYTRw5YgnCB2_uorVaUsL6Z0QYQO2FqzCiyg,32
|
4
4
|
goose/flow.py,sha256=K29ugPXLuGrsHBVry3WH94FE6_6Epg30-04V5Q69JPo,10482
|
5
5
|
goose/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
-
goose_py-0.2.
|
7
|
-
goose_py-0.2.
|
8
|
-
goose_py-0.2.
|
6
|
+
goose_py-0.2.2.dist-info/METADATA,sha256=BnE7WYuV1AlWofi0ejabJMSTp10GLR6xpDZk0AgFo9A,1106
|
7
|
+
goose_py-0.2.2.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
8
|
+
goose_py-0.2.2.dist-info/RECORD,,
|
File without changes
|