This is a monkeypatch to workaround AutoGPTQ issue 459:
import os
import time
from logging import getLogger
import torch
import torch.nn as nn
import transformersThis is a monkeypatch to workaround AutoGPTQ issue 459:
import os
import time
from logging import getLogger
import torch
import torch.nn as nn
import transformersThis is an ugly and minimally tested workaround for folks who would like to use PydanticAI response model formatting with VLLM prior to 13002 being merged into VLLM. I've tested this avainst PydanticAI 0.0.46:
First apply this monkeypatch to PydanticAI. Basically it allows agent runs to specify named tools on model settings:
# 2025-03-30 Patched 0.0.46
# pylint: disable=protected-access
async def patched_completions_create(| from typing import List, Optional | |
| from mcp.types import ( | |
| EmbeddedResource, | |
| ImageContent, | |
| TextContent, | |
| ) | |
| from mcp_agent import PromptMessageMultipart, RequestParams, TextContent | |
| from mcp_agent.agents.workflow.chain_agent import ChainAgent | |
| from mcp_agent.core.prompt import Prompt |
| #!/bin/bash | |
| # Copyright (c) 2025, The Objective Dad | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | |
| # associated documentation files (the “Software”), to deal in the Software without restriction, | |
| # including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| # and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, | |
| # subject to the following conditions: | |
| # | |
| # The above copyright notice and this permission notice shall be included in all copies or substantial |