Skip to main content

package to handle interacting with ai or llms

Project description

Microsoft Teams SDK

AI-powered conversational experiences for Microsoft Teams applications. Provides prompt management, action planning, and model integration for building intelligent Teams bots.

📖 Documentation

Installation

pip install microsoft-teams-ai

Or if using uv:

uv add microsoft-teams-ai

Usage

ChatPrompt

from microsoft_teams.ai import ChatPrompt, Function
from microsoft_teams.openai import OpenAICompletionsAIModel
from pydantic import BaseModel

model = OpenAICompletionsAIModel(api_key="your-api-key", model="gpt-4")

# Create a ChatPrompt
prompt = ChatPrompt(model)

result = await prompt.send(
    input="Hello!",
    instructions="You are a helpful assistant."
)

Function Calling

class GetWeatherParams(BaseModel):
    location: str

async def get_weather(params: GetWeatherParams) -> str:
    return f"The weather in {params.location} is sunny"

weather_function = Function(
    name="get_weather",
    description="Get weather for a location",
    parameter_schema=GetWeatherParams,
    handler=get_weather
)

prompt = ChatPrompt(model, functions=[weather_function])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microsoft_teams_ai-2.0.0a50.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microsoft_teams_ai-2.0.0a50-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file microsoft_teams_ai-2.0.0a50.tar.gz.

File metadata

  • Download URL: microsoft_teams_ai-2.0.0a50.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: RestSharp/106.13.0.0

File hashes

Hashes for microsoft_teams_ai-2.0.0a50.tar.gz
Algorithm Hash digest
SHA256 2b57d20f9af0cd59cf8a9d7ac04e4e176cbba56b27b93177aaf7ae0fa0c8e3bf
MD5 0881e489d1604451ef8b8b4494b3742c
BLAKE2b-256 1e8675aeca4bee8f25cc887abf4a899c65965d0ca5adcc3efb732ea3713e41c2

See more details on using hashes here.

File details

Details for the file microsoft_teams_ai-2.0.0a50-py3-none-any.whl.

File metadata

File hashes

Hashes for microsoft_teams_ai-2.0.0a50-py3-none-any.whl
Algorithm Hash digest
SHA256 697dca9f40dbf8ef26059dee84f962249896a731fc55a3a1df041d2725d760af
MD5 169dc30fe417f91bb9e0caf27a8567d2
BLAKE2b-256 5d8e859e315b1b564833d94a3fac8e8807f8d6c009c2014b333437463bfb99bb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page