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 = False, indent: int = 2, **kwargs)
Bases:
GitCodeLLMToolOpenAI-compatible callable tool for invoking GitCode SDK resources.
- Parameters:
async_mode – When true, calling the instance returns the async tool coroutine.
indent –
indentargument passed tojson.dumps()when serializing invocation results (default2).kwargs – Passed to
gitcode_api.llm.GitCodeLLMTool—client,async_client,api_key,owner,repo,base_url,timeout,decrypt.
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.