avatarLaxfed Paulacy

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

1693

Abstract

ird parties. The judging criteria include prompt utilization, commodity hardware usage, composability, and the production status of the application.</p><p id="b364">To get started, you can install Prem on MacOS by downloading the Prem App or on a server by running the installer script. Once installed, the UI will allow you to see and download available services with just one click. Then, you can connect to the service at <a href="http://localhost:8111">http://localhost:8111</a> and start building your app.</p><p id="6bd6">If you want to integrate Prem with LangChain, here is a simple snippet using LangChain to connect to the service:</p><div id="1231"><pre>import os <span class="hljs-keyword">from</span> langchain.chat_models import ChatOpenAI <span class="hljs-keyword">from</span> langchain.schema import AIMessage, HumanMessage

os.environ[<span class="hljs-string">"OPENAI_API_KEY"</span>] = <span class="hljs-string">"random-string"</span>

chat = ChatOpenAI(<span class="hljs-attribute">openai_api_base</span>=<span class="hljs-string">"http://localhost:8111/api/v1"</span>, <span class="hljs-attribute">max_tokens</span>=128)

messages = [ HumanMessage(<span class="hljs-attribute">content</span>=<span class="hljs-string">"Can you explain what is a large language model?"</span>) ] response = chat(messages) <span class="hljs-built_in">print</span>(response)

messages = [ HumanMessage(<span class="hljs-attribute">content</span>=<span class="hljs-string">"Write me a story about a superstar."</span>) ] response = chat(messages) <span class="hljs-built_in">print</span>(response)</pre></div><p id="9371">This snippet demonstrates how to use LangChain to connect to t

Options

he Prem AI service and interact with it. By following the challenge guidelines and integrating Prem with LangChain, developers can create privacy-centric AI applications that empower users while ensuring data privacy. For more information, you can refer to the <a href="https://github.com/premai-io/prem-app">Prem documentation</a>.</p><p id="3a62">The challenge presents a great opportunity for developers to showcase their skills and contribute to the ecosystem of privacy-preserving applications. With the integration of Prem and LangChain, developers can create innovative AI applications while maintaining user privacy and data ownership.</p><div id="c75e" class="link-block"> <a href="https://readmedium.com/langchain-chat-your-data-1a4b5b65f523"> <div> <div> <h2>LANGCHAIN — Chat Your Data</h2> <div><h3>In the “Chat-Your-Data” Challenge, LangChain has initiated a week-long challenge to create ChatGPT models over custom…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*nu7ZXSdSXeo6aCLEJYoZpg.jpeg)"></div> </div> </div> </a> </div><p id="50af">So, if you are a developer looking to build privacy-centric AI applications, this challenge is an excellent opportunity to explore the capabilities of Prem and LangChain and contribute to the growing ecosystem of privacy-focused AI solutions. Start building your application today and participate in the Prem challenge to showcase your innovative AI solutions.</p></article></body>

LANGCHAIN — Can You Meet the Language Chain Challenge?

Technology makes it possible for people to gain control over everything, except over technology. — John Tudor.

In collaboration with LangChain, Prem is hosting a challenge to encourage developers to build innovative applications, services, and solutions that prioritize user privacy. To participate, developers are required to leverage Prem to deploy AI models and services on-premise without relying on centralized APIs at any point in their stack. The challenge will run from the 26th of June to the 10th of July and will award up to $10,000+ to the final selected projects.

To qualify for the challenge, applications should be open-source, use Prem services, and not log user data on their server or any third parties. The judging criteria include prompt utilization, commodity hardware usage, composability, and the production status of the application.

To get started, you can install Prem on MacOS by downloading the Prem App or on a server by running the installer script. Once installed, the UI will allow you to see and download available services with just one click. Then, you can connect to the service at http://localhost:8111 and start building your app.

If you want to integrate Prem with LangChain, here is a simple snippet using LangChain to connect to the service:

import os
from langchain.chat_models import ChatOpenAI
from langchain.schema import AIMessage, HumanMessage

os.environ["OPENAI_API_KEY"] = "random-string"

chat = ChatOpenAI(openai_api_base="http://localhost:8111/api/v1", max_tokens=128)

messages = [
    HumanMessage(content="Can you explain what is a large language model?")
]
response = chat(messages)
print(response)

messages = [
    HumanMessage(content="Write me a story about a superstar.")
]
response = chat(messages)
print(response)

This snippet demonstrates how to use LangChain to connect to the Prem AI service and interact with it. By following the challenge guidelines and integrating Prem with LangChain, developers can create privacy-centric AI applications that empower users while ensuring data privacy. For more information, you can refer to the Prem documentation.

The challenge presents a great opportunity for developers to showcase their skills and contribute to the ecosystem of privacy-preserving applications. With the integration of Prem and LangChain, developers can create innovative AI applications while maintaining user privacy and data ownership.

So, if you are a developer looking to build privacy-centric AI applications, this challenge is an excellent opportunity to explore the capabilities of Prem and LangChain and contribute to the growing ecosystem of privacy-focused AI solutions. Start building your application today and participate in the Prem challenge to showcase your innovative AI solutions.

Langchain
Language
ChatGPT
Chain
Meet
Recommended from ReadMedium