gitcode_api.llm.openai
OpenAI tool adapter for the GitCode SDK.
Classes
|
OpenAI-compatible callable tool for invoking GitCode SDK resources. |
- class GitCodeOpenAITool(async_mode: bool | None = None, **kwargs)
Bases:
GitCodeLLMToolOpenAI-compatible callable tool for invoking GitCode SDK resources.
- Parameters:
async_mode – When true, calling the instance returns the async tool coroutine.
kwargs – Forwarded to
gitcode_api.llm.GitCodeLLMTool.{"async": True}is also accepted for frameworks that construct tools from dictionaries.
Create an OpenAI tool wrapper.
- property tool: Dict[str, Any]
Return this tool in OpenAI Chat Completions tool format.
- to_dict() Dict[str, Any]
Return this tool in OpenAI Chat Completions tool format.