semvec/pypi-packages huggingface dataset:
langchain-wiproai 0.1.0
Wipro AI integration for LangChain
License: MIT
Requires Python: >=3.8
Keywords: langchain, wiproai, llm, ai

# langchain-wiproai

Wipro AI integration for LangChain, providing seamless access to Wipro AI models with full tool calling support.

## Installation

```bash
pip install langchain-wiproai
```

## Quick Start

```python
from langchain_wiproai import ChatWiproAI

# Initialize the model
llm = ChatWiproAI(
    api_token="your-api-token",
    model_name="gpt-4o",
    temperature=0.0
)

# Simple usage
response = llm.invoke("Hello, how are you?")
print(response.content)

# With tool calling
from langchain_core.tools import tool

@tool
def get_weather(location: str) -> str:
    \"\"\"Get the weather for a location.\"\"\"
    return f"The weather in {location} is sunny!"

llm_with_tools = llm.bind_tools([get_weather])
response = llm_with_tools.invoke("What's the weather in Paris?")
print(response.tool_calls)
```

## Configuration

### Environment Variables

You can set your API token as an environment variable:

```bash
export WIPROAI_API_TOKEN="your-api-token"
```

Then use without passing the token:

```python
from langchain_wiproai import ChatWiproAI

llm = ChatWiproAI()  # Will use WIPROAI_API_TOKEN from environment
```

### Parameters

- `api_token` (str): Your Wipro AI API token
- `api_url` (str): API endpoint URL (default: Wipro AI endpoint)
- `model_name` (str): Model to use (default: "gpt-4o")
- `temperature` (float): Temperature for generation (default: 0.0, range: 0.0-2.0)
- `max_output_tokens` (int): Maximum tokens to generate (default: 2000)
- `top_p` (float): Top-p sampling parameter (default: 1.0, range: 0.0-1.0)
- `top_k` (int): Top-k sampling parameter (default: 1)

## Advanced Usage

### Streaming

```python
for chunk in llm.stream("Tell me a story"):
    print(chunk.content, end="", flush=True)
```

### Async

```python
import asyncio

async def main():
    response = await llm.ainvoke("Hello!")
    print(response.content)

asyncio.run(main())
```

### With LangChain Agents

```python
from langchain.agents import create_react_agent
from langchain_wiproai import ChatWiproAI
from langchain_core.tools import tool

@tool
def calculator(expression: str) -> str:
    \"\"\"Calculate a mathematical expression.\"\"\"
    return str(eval(expression))

llm = ChatWiproAI(temperature=0)
agent = create_react_agent(llm, [calculator])
result = agent.invoke({"input": "What is 25 * 47?"})
```

## Features

- ✅ Full LangChain integration
- ✅ Tool/function calling support
- ✅ Streaming support
- ✅ Async support
- ✅ Automatic JSON tool call parsing
- ✅ Multiple response format handling
- ✅ Pydantic v2 compatibility
tw-cwa-weather-mcp 1.0.0
Taiwan CWA Weather MCP Server - Access Taiwan weather data through Model Context Protocol
License: MIT
Requires Python: >=3.10
Keywords: mcp, model-context-protocol, taiwan, weather, cwa

# Taiwan CWA Weather MCP Server

Access Taiwan Central Weather Administration (CWA) weather data and forecasts through the Model Context Protocol.

<!-- mcp-name: io.github.nigue3025/tw-cwa-weather-mcp -->

## Features

- Get weather forecasts for all Taiwan counties and cities
- List available locations
- Support for location aliases
- Real-time data from Taiwan CWA OpenData API

## Tools

### get_weather
Get weather forecast data for a specific Taiwan location.

**Parameters:**
- `given_location` (string): The county or city name (supports both Chinese and aliases)

**Returns:** Weather forecast data including temperature, rainfall probability, weather conditions, and comfort level.

### list_available_locations
List all available Taiwan counties/cities and their aliases.

**Returns:** Complete list of supported locations and their alternative names.

## Installation

```bash
pip install tw-cwa-weather-mcp
```

## Configuration

You need a Taiwan CWA API key to use this server. Create a file named `GOV_api_key.txt` in the server directory with your API key.

Get your API key from: https://opendata.cwa.gov.tw/

## Usage

Add to your MCP client configuration:

```json
{
  "mcpServers": {
    "taiwan-weather": {
      "command": "python",
      "args": ["-m", "tw_cwa_weather_mcp"]
    }
  }
}
```

## Development

This server uses FastMCP to provide Taiwan weather data through the Model Context Protocol.

## License

MIT License

## Author

nigue3025
pymonoprice 0.5
Python API for talking to Monoprice 6-zone amplifier
License: MIT

## Status
[![Build Status](https://github.com/etsinko/pymonoprice/actions/workflows/ci.yml/badge.svg)](https://github.com/etsinko/pymonoprice/actions/workflows/ci.yml)[![Coverage Status](https://coveralls.io/repos/github/etsinko/pymonoprice/badge.svg)](https://coveralls.io/github/etsinko/pymonoprice)

# pymonoprice
Python3 interface implementation for Monoprice 6 zone amplifier

## Notes
This is for use with [Home-Assistant](http://home-assistant.io)

## Usage
```python
from pymonoprice import get_monoprice

monoprice = get_monoprice('/dev/ttyUSB0')
# Valid zones are 11-16 for main monoprice amplifier
zone_status = monoprice.zone_status(11)

# Print zone status
print('Zone Number = {}'.format(zone_status.zone))
print('Power is {}'.format('On' if zone_status.power else 'Off'))
print('Mute is {}'.format('On' if zone_status.mute else 'Off'))
print('Public Anouncement Mode is {}'.format('On' if zone_status.pa else 'Off'))
print('Do Not Disturb Mode is {}'.format('On' if zone_status.do_not_disturb else 'Off'))
print('Volume = {}'.format(zone_status.volume))
print('Treble = {}'.format(zone_status.treble))
print('Bass = {}'.format(zone_status.bass))
print('Balance = {}'.format(zone_status.balance))
print('Source = {}'.format(zone_status.source))
print('Keypad is {}'.format('connected' if zone_status.keypad else 'disconnected'))

# Turn off zone #11
monoprice.set_power(11, False)

# Mute zone #12
monoprice.set_mute(12, True)

# Set volume for zone #13
monoprice.set_volume(13, 15)

# Set source 1 for zone #14 
monoprice.set_source(14, 1)

# Set treble for zone #15
monoprice.set_treble(15, 10)

# Set bass for zone #16
monoprice.set_bass(16, 7)

# Set balance for zone #11
monoprice.set_balance(11, 3)

# Restore zone #11 to it's original state
monoprice.restore_zone(zone_status)
```

## Usage with asyncio

With `asyncio` flavor all methods of Monoprice object are coroutines.

```python
import asyncio
from pymonoprice import get_async_monoprice

async def main(loop):
    monoprice = await get_async_monoprice('/dev/ttyUSB0', loop)
    zone_status = await monoprice.zone_status(11)
    if zone_status.power:
        await monoprice.set_power(zone_status.zone, False)

loop = asyncio.get_event_loop()
loop.run_until_complete(main(loop))

```