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

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.0a7.tar.gz (7.8 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.0a7-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: microsoft_teams_ai-2.0.0a7.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for microsoft_teams_ai-2.0.0a7.tar.gz
Algorithm Hash digest
SHA256 f1397b28828a6ee9d5a23a32d120c35ecb0e65a2cda1a0cd67b2713ed4c5a93c
MD5 66f732056fa2e58632441fda91c5ad35
BLAKE2b-256 0cefcdbf49955bd56099085d8cb467ff6c1a5d25f5392639574ffe219904ca5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: microsoft_teams_ai-2.0.0a7-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for microsoft_teams_ai-2.0.0a7-py3-none-any.whl
Algorithm Hash digest
SHA256 1627d3d07cceca4a7d58bb6df0961ff64f2e003102f83e6f14aa5ec7d5adb587
MD5 647bd440eafa52a7620232dee48fe675
BLAKE2b-256 307d9985777f77371af4d80374aa9c3e1cf83c45ef5c5d80f70f4418c5bea30e

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