SDK
Maisa SDK
We have Python SDK. You can look on our GitHub with the following link.
With this SDK, you can perform the same things that we have in our API Reference, like these:
Install the SDK
pip install maisa
Extract
from maisa import Maisa
from maisa.types.capability_extract_params import Variables
maisa = Maisa(
api_key="YOUR_API_KEY",
)
extract = maisa.capabilities.extract(
text="Samuel Harris Altman is an American entrepreneur and investor best known as the CEO of OpenAI since 2019 (he was briefly fired and reinstated in November 2023). Altman is considered to be one of the leading figures of the AI boom. He dropped out of university after two years and founded Loopt, a mobile social networking service, raising more than $30 million in venture capital. In 2011, Altman joined Y Combinator, a startup accelerator, and was its president from 2014 to 2019. In 2005, at the age of 19, Altman co-founded Loopt, a location-based social networking mobile application. As CEO, Altman raised more than $30 million in venture capital for the company; however, Loopt failed to gain traction with enough users. In March 2012, it was acquired by the Green Dot Corporation for $43.4 million. The following month, Altman co-founded Hydrazine Capital with his brother, Jack Altman. Altman became a partner at Y Combinator, a startup accelerator that invests in a wide range of startups, in 2011, initially working there on a part-time basis. In February 2014, Altman was named president of Y Combinator by its co-founder, Paul Graham. In a 2014 blog post, Altman said that the total valuation of Y Combinator companies had surpassed $65 billion, including Airbnb, Dropbox, Zenefits, and Stripe. In September 2016, Altman announced his expanded role as president of YC Group, which included Y Combinator and other units.[21] Altman said that he hoped to expand Y Combinator to fund 1,000 new companies per year. He also tried to expand the types of companies funded by YC, especially hard technology companies. In October 2015, Altman announced YC Continuity, a $700 million equity fund investing in YC companies as they matured. A week earlier, Altman had introduced Y Combinator Research, a non-profit research lab, and donated $10 million to fund it. YC Research has thus far announced research on basic income, the future of computing, education, and building new cities. In March 2019, YC announced Altman's transition from the president of the company to a less hands-on role as chairman of the board, for him to focus on OpenAI. This decision came shortly after YC announced it would be moving its headquarters to San Francisco. As of early 2020, he was no longer affiliated with YC. It was later reported that Altman was fired from YC, and had appointed himself Chairman without authorization. Altman co-founded Tools For Humanity in 2019, a company which builds and distributes systems designed to scan people's eyes to provide authentication and verify proof of personhood to counter fraud. People who agree to have their eyes scanned are compensated with a cryptocurrency called Worldcoin. Tools For Humanity describes its cryptocurrency as similar to universal basic income. Altman has several other investments. Including, Humane, the world's first wearable computer powered by AI, Retro Biosciences, a research company aiming to extend human life by 10 years, and Helion Energy, an American fusion research company.",
variables={
"altman_openai_start_date": Variables(
description="When did Samuel Altman become the CEO of OpenAI?", type="date"
),
"altman_social_network_service": Variables(
description="Which mobile social networking service did Samuel Altman found?",
type="string",
),
"altman_venture_capital_raised": Variables(
description="How much venture capital did Samuel Altman raise for the mobile social networking service?",
type="number",
),
"altman_joining_ycombinator_date": Variables(
description="When did Samuel Altman join Y Combinator?", type="date"
),
"ycombinator_president_start_date": Variables(
description="When did Samuel Altman serve as the president of Y Combinator?",
type="date",
),
"hydrazine_co_founder": Variables(
description="What is the name of the company that Samuel Altman co-founded with his brother?",
type="string",
),
"yc_companies_valuation": Variables(
description="How much did the total valuation of companies at Y Combinator surpass in 2014 under Altman?",
type="number",
),
"yc_continuity_fund_value": Variables(
description="What is YC Continuity that Altman introduced, and how much does the fund amount to?",
type="number",
),
"altman_yc_position": Variables(
description="What position did Altman transition to at Y Combinator in 2019?",
type="string",
),
"altman_co_found_company_tech": Variables(
description="What is the name of the company that Altman co-founded which employs eye scanning technology, and what cryptocurrency does it offer?",
type="string",
),
"altman_investment_companies": Variables(
description="In which companies has Altman made investments?", type="string"
),
},
)
Generate Embeddings
from maisa import Maisa
maisa = Maisa(
api_key="YOUR_API_KEY",
)
model_embedding_response = maisa.models.embeddings.create(
texts=[
"Thomas Edison invented the light bulb",
"It's a nice day, isn't it",
"The bulb is broken, we should buy a new one",
]
)
Rerank sentences
from maisa import Maisa
maisa = Maisa(
api_key="YOUR_API_KEY",
)
model_rerank_response = maisa.models.rerank.create(
sentences=[
"Thomas Edison invented the light bulb",
"It's a nice day, isn't it",
"The bulb is broken, we should buy a new one",
],
source_sentence="Who invented the light bulb?",
)
Updated 10 months ago