goose-py 0.2.1__tar.gz → 0.2.2__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: goose-py
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: A tool for AI workflows based on human-computer collaboration and structured output.
5
5
  Home-page: https://github.com/chelle-ai/goose
6
6
  Keywords: ai,yaml,configuration,llm
@@ -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
- input_cost = self.INPUT_CENTS_PER_MILLION_TOKENS[self.model] * self.input_tokens
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,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "goose-py"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "A tool for AI workflows based on human-computer collaboration and structured output."
5
5
  authors = [
6
6
  "Nash Taylor <nash@chelle.ai>",
File without changes
File without changes
File without changes
File without changes
File without changes