Skip to content

Commit

Permalink
fix: crash when no tools are given (no conditional tool_choice)
Browse files Browse the repository at this point in the history
chore: bump to v0.0.6
  • Loading branch information
moesmufti committed Dec 17, 2024
1 parent f1e24ef commit bcfa711
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "xai-grok-sdk"
version = "0.0.5"
version = "0.0.6"
description = "Lightweight xAI SDK with minimal dependencies"
dependencies = [
"requests>=2.32.3",
Expand Down
3 changes: 1 addition & 2 deletions src/xai_grok_sdk/xai.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ def invoke(
payload = {
"model": self.model,
"messages": messages,
"tool_choice": tool_choice,
}

# Add optional parameters if they differ from defaults
Expand Down Expand Up @@ -152,7 +151,7 @@ def invoke(
# Include tools if configured
if len(self.tools) > 0:
payload["tools"] = self.tools

payload["tool_choice"] = tool_choice

# Make API call
response_data = self._make_api_call(payload)
Expand Down

0 comments on commit bcfa711

Please sign in to comment.