Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
Microsoft Teams SDK
[!WARNING] Deprecated — This package was originally in preview, but we have decided to stop maintaining it before General Availability. We recommend using the Agent Framework instead, which provides better long-term support for building AI-powered Teams applications.
AI-powered conversational experiences for Microsoft Teams applications. Provides prompt management, action planning, and model integration for building intelligent Teams bots.
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])
Release files for microsoft-teams-ai 2.0.0a78
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| microsoft_teams_ai-2.0.0a78.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| microsoft_teams_ai-2.0.0a78-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.1 kB
Release files / microsoft_teams_ai-2.0.0a78.tar.gz
| Download URL | microsoft_teams_ai-2.0.0a78.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7e0c4902c7e99048583a52cc8f31cd756c0150fd808c7b7f74d5dce39e742024
|
|
BLAKE2b-256 checksum How to use checksums |
6c96fa6741973f68873c6a67fb7d8664bd85a469072ceacd2cc608956cdf53c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|
Release files / microsoft_teams_ai-2.0.0a78-py3-none-any.whl
| Download URL | microsoft_teams_ai-2.0.0a78-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8bb866aaf022334d8e410d39a630c95e8821557a25451d65f4429b86b67dde36
|
|
BLAKE2b-256 checksum How to use checksums |
a1a3b3333d0af8859055176d92a92d639094011b48b5211c359f489cc0472a5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
RestSharp/106.13.0.0
|