Skip to content

Web call using <tool_call>#50

Closed
maisiukartyom wants to merge 6 commits intomainfrom
web-call
Closed

Web call using <tool_call>#50
maisiukartyom wants to merge 6 commits intomainfrom
web-call

Conversation

@maisiukartyom
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread lamoom/ai_models/claude/claude_model.py Outdated
max_tokens: int,
client_secrets: dict = {},
tool_registry: t.Dict[str, ToolDefinition] = AVAILABLE_TOOLS_REGISTRY,
max_tool_iterations: int = 5, # Safety limit for sequential calls
Copy link
Copy Markdown
Collaborator

@Katsiarynka Katsiarynka Apr 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
max_tool_iterations: int = 5, # Safety limit for sequential calls
max_tool_iterations: int = 10, # Safety limit for sequential calls

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's have 10

Comment thread lamoom/ai_models/claude/claude_model.py Outdated
stream_idx += 1
# Check connection periodically
if stream_idx % 5 == 0:
if not check_connection(**stream_params):
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not check_connection(**stream_params):
if check_connection && not check_connection(**stream_params):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output can be not streaming, and in that case check_connection will be None

Comment thread lamoom/ai_models/claude/claude_model.py Outdated
content += text
idx += 1
iteration_count = 0
while iteration_count < max_tool_iterations:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move everything into functions. Impossible to read the code. One function max 100 lines

@Katsiarynka Katsiarynka deleted the web-call branch May 15, 2025 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants