openrouter-provider 0.0.2__tar.gz → 0.0.4__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.

Potentially problematic release.


This version of openrouter-provider might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openrouter-provider
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: This is an unofficial wrapper of OpenRouter.
5
5
  Author-email: Keisuke Miyamto <aichiboyhighschool@gmail.com>
6
6
  Requires-Python: >=3.7
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "openrouter-provider"
3
- version = "0.0.2"
3
+ version = "0.0.4"
4
4
  description = "This is an unofficial wrapper of OpenRouter."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.7"
@@ -82,11 +82,10 @@ class OpenRouterProvider:
82
82
 
83
83
 
84
84
  def invoke(self, model: LLMModel, system_prompt: Chat_message, querys: list[Chat_message], tools:list[tool_model]=[], provider:ProviderConfig=None) -> Chat_message:
85
- print(provider.to_dict())
86
85
  response = self.client.chat.completions.create(
87
86
  model=model.name,
88
87
  messages=self.make_prompt(system_prompt, querys),
89
- tools=[tool.tool_definition for tool in tools],
88
+ tools=[tool.tool_definition for tool in tools] if tools else None,
90
89
  extra_body={
91
90
  "provider": provider.to_dict() if provider else None
92
91
  }
@@ -98,6 +97,5 @@ class OpenRouterProvider:
98
97
  for tool in response.choices[0].message.tool_calls:
99
98
  reply.tool_calls.append(ToolCall(id=tool.id, name=tool.function.name, arguments=tool.function.arguments))
100
99
 
101
- print(response)
102
100
  return reply
103
101
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: openrouter-provider
3
- Version: 0.0.2
3
+ Version: 0.0.4
4
4
  Summary: This is an unofficial wrapper of OpenRouter.
5
5
  Author-email: Keisuke Miyamto <aichiboyhighschool@gmail.com>
6
6
  Requires-Python: >=3.7