Meta AI API Wrapper to interact with the Meta AI API
Project description
MetaAI API Wrapper
MetaAI is a Python library designed to interact with Meta's AI APIs that run in the backend of https://www.meta.ai/. It encapsulates the complexities of authentication and communication with the APIs, providing a straightforward interface for sending queries and receiving responses.
With this you can easily prompt the AI with a message and get a response, directly from your Python code. NO API KEY REQUIRED
Meta AI is connected to the internet, so you will be able to get the latest real-time responses from the AI. (powered by Bing)
Meta AI is running Llama 3 LLM.
Features
- Prompt AI: Send a message to the AI and get a response from Llama 3.
- Get Up To Date Information: Get the latest information from the AI thanks to its connection to the internet.
- Get Sources: Get the sources of the information provided by the AI.
Usage
Download:
pip install meta-ai-api
Initialization:
from meta_ai_api import MetaAI
ai = MetaAI()
response = ai.prompt(message="Whats the weather in San Francisco today? And what is the date?")
print(response)
result:
{
"message":"The weather in San Francisco, California, today includes ¹:\nNo precipitation with skies ranging from clear to cloudy\nWind speeds range from 0 to 21 miles per hour\nTemperatures range from 52 to 69 degrees Fahrenheit\nPlease note that the weather forecast is continually changing ² ³ ⁴.\n",
"sources":[
{
"link":"https://www.wolframalpha.com/input?i=San+Francisco+weather+today",
"title":"WolframAlpha"
},
{
"link":"https://www.accuweather.com/en/us/san-francisco/94103/weather-forecast/347629",
"title":"San Francisco, CA Weather Forecast - AccuWeather"
},
{
"link":"https://weather.com/weather/tenday/l/San+Francisco+CA+USCA0987:1:US",
"title":"10-Day Weather Forecast for San Francisco, CA"
},
{
"link":"https://weather.com/weather/tenday/l/Inverness+CA?canonicalCityId=61b2ebcaa5e78eebca92d21eaff7a0439eb081e8e60287fca37af4186f8242b7",
"title":"10-Day Weather Forecast for Inverness, CA"
}
]
}
from meta_ai_api import MetaAI
ai = MetaAI()
response = ai.prompt(message="What was the Warriors score last game?")
print(response)
result:
{
"message":"The Golden State Warriors' last game was against the Sacramento Kings, and they lost 118-94 ¹ ². Stephen Curry scored 22 points, and the Kings' win eliminated the Warriors from the playoffs ³. The Warriors finished the season 46-36 and 10th in the Western Conference ⁴ ³.\n",
"sources":[
{
"link":"https://sportradar.com/",
"title":"Game Info of NBA from sportradar.com"
},
{
"link":"https://www.sofascore.com/team/basketball/golden-state-warriors/3428",
"title":"Golden State Warriors live scores & schedule - Sofascore"
},
{
"link":"https://www.foxsports.com/nba/golden-state-warriors-team-schedule",
"title":"Golden State Warriors Schedule & Scores - NBA - FOX Sports"
},
{
"link":"https://en.wikipedia.org/wiki/History_of_the_Golden_State_Warriors",
"title":"History of the Golden State Warriors"
}
]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file meta_ai_api-1.0.11.tar.gz
.
File metadata
- Download URL: meta_ai_api-1.0.11.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 258d20bab86bc7fd4799cd542b72beeaba038f77979fec777da44656ce54fdf8 |
|
MD5 | 3940812ed2895b64365b310138655a12 |
|
BLAKE2b-256 | 644b48ea8c28f93e8d07b8345bb8912b39fc7010a4ecf7c58890e46fa8f11355 |
File details
Details for the file meta_ai_api-1.0.11-py3-none-any.whl
.
File metadata
- Download URL: meta_ai_api-1.0.11-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e628cc03943e05b1ce1e9ae70c27f27af6a3149d8912c504dcc9a5d19358dd26 |
|
MD5 | c3ed47cf049137f559124089c11018a6 |
|
BLAKE2b-256 | 7ad05856db8f5432b5bea407bd6b83a2554aa229cba9fc22f9d6276b8ead71f4 |