Skip to main content

LLM Connectors

A Python library providing connectors for popular AI platforms including ChatGPT, Copilot, Gemini, and DeepSeek.

Installation

pip install llm-connectors

Usage

ChatGPT

from llm_connectors import ChatGPTConnector

# Initialize the connector
chatgpt = ChatGPTConnector(api_key="your-openai-api-key")

# Chat example
messages = [
    {"role": "user", "content": "Hello, how are you?"}
]
response = await chatgpt.chat(messages)
print(response["content"])

# Text generation example
text = await chatgpt.generate_text("Write a poem about AI")
print(text)

# Get embeddings
embeddings = await chatgpt.get_embeddings("Hello, world!")
print(embeddings)

Gemini

from llm_connectors import GeminiConnector

# Initialize the connector
gemini = GeminiConnector(api_key="your-google-api-key")

# Chat example
messages = [
    {"role": "user", "content": "Hello, how are you?"}
]
response = await gemini.chat(messages)
print(response["content"])

# Text generation example
text = await gemini.generate_text("Write a poem about AI")
print(text)

# Get embeddings
embeddings = await gemini.get_embeddings("Hello, world!")
print(embeddings)

Copilot and DeepSeek

Note: These connectors are currently placeholders and will be implemented when their respective APIs become available.

Features

  • Unified interface for multiple AI platforms
  • Async support for better performance
  • Consistent API across different providers
  • Support for chat, text generation, and embeddings
  • Type hints for better IDE support

Requirements

  • Python 3.8+
  • OpenAI API key (for ChatGPT)
  • Google API key (for Gemini)
  • Microsoft API key (for Copilot, when available)
  • DeepSeek API key (when available)

License

MIT License

Metadata

Release files for llm-connectors 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-connectors 0.1.0
File Size Uploaded Provenance
llm_connectors-0.1.0.tar.gz 7.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-connectors 0.1.0
File Interpreter ABI Platform
llm_connectors-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.1 kB

Release files / llm_connectors-0.1.0.tar.gz

Download URL llm_connectors-0.1.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
637df2b03e4eac72959ecc7978c8243ae5bd2d30dd831d8657b33568a24ddd4b
BLAKE2b-256 checksum
How to use checksums
55093143e0612c4806db013de05abb54ca4b8185f740d15fea03796502714df2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Release files / llm_connectors-0.1.0-py3-none-any.whl

Download URL llm_connectors-0.1.0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
950bf53e8f9d3a2eff730af7652704aba72f6bb45fe48bc3e22286b87f041e18
BLAKE2b-256 checksum
How to use checksums
21b3e3ae2a1dc9cc3237d35d76370dcbb745fbfeaa48938719a8db2ba2549042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.7

Security for llm-connectors 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page