gemini-agent-framework 0.1.9__py3-none-any.whl → 0.1.10__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.
gemini_agent/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from .agent import Agent
2
2
 
3
- __version__ = "0.1.9"
3
+ __version__ = "0.1.10"
4
4
  __all__ = ["Agent"]
gemini_agent/agent.py CHANGED
@@ -181,6 +181,8 @@ class Agent:
181
181
  'created_at': datetime.now().isoformat()
182
182
  }
183
183
 
184
+ return name
185
+
184
186
  def get_variable(self, name: str) -> Any:
185
187
  """
186
188
  Retrieves a stored variable's value.
@@ -408,19 +410,21 @@ class Agent:
408
410
 
409
411
  result_key = f"result_{len(self._intermediate_results)}"
410
412
  self._intermediate_results[result_key] = function_result
411
-
413
+
414
+ varaible_name = self.set_variable(result_key, function_result, "the result of function call with name {tool_name} and arguments {args}")
412
415
  function_response_part = {
413
416
  "functionResponse": {
414
417
  "name": tool_name,
415
418
  "response": {
416
419
  "content": function_result,
417
- "key": result_key,
420
+ "key": varaible_name,
418
421
  "content_type": type(function_result).__name__
419
422
  }
420
423
  }
421
424
  }
422
425
 
423
- self.set_variable(result_key, function_result, "the result of function call with name {tool_name} and arguments {args}")
426
+ payload["contents"].append({"role": "user", "parts": [{"text": f"the return value of the function stored in the variable {varaible_name}"}]})
427
+
424
428
  payload["contents"].append({"role": "user", "parts": [function_response_part]})
425
429
 
426
430
  except Exception as e:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gemini-agent-framework
3
- Version: 0.1.9
3
+ Version: 0.1.10
4
4
  Summary: A framework for building agents that use Gemini's function calling capabilities
5
5
  Project-URL: Homepage, https://github.com/m7mdony/gemini-agent-framework
6
6
  Project-URL: Documentation, https://github.com/m7mdony/gemini-agent-framework#readme
@@ -0,0 +1,5 @@
1
+ gemini_agent/__init__.py,sha256=rNKD-jP6y-Csd5s_LT_qIzwvteYe_23cYqoKf8vmyf0,72
2
+ gemini_agent/agent.py,sha256=OINAAAw7VEUKS4NY5N-GItrt0McQVseRXyXv5Rw43AM,25883
3
+ gemini_agent_framework-0.1.10.dist-info/METADATA,sha256=4lXbmc0Zm9NDhv8xbYe3tuMqkRnReuaB3xf4E1aqgI0,2387
4
+ gemini_agent_framework-0.1.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ gemini_agent_framework-0.1.10.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- gemini_agent/__init__.py,sha256=7FDPUc1fVrUccXn0FvUfpzjXTI2rjDL0F0LtrLa5Mxw,71
2
- gemini_agent/agent.py,sha256=8DZKLCAP1L30s1oiImjIhKj6S8ynxvxcZVQmZDCze3s,25612
3
- gemini_agent_framework-0.1.9.dist-info/METADATA,sha256=MGED2_JeI2kkMyMX89s5Tgc1uFzMpXMqVYeuXEjhoYM,2386
4
- gemini_agent_framework-0.1.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- gemini_agent_framework-0.1.9.dist-info/RECORD,,