docs: hide windows for desktop installation (#8707)
* hide-windows-desktop * troubleshooting * trailing-space-to-run-ci
This commit is contained in:
parent
9f817ca4fb
commit
352786c6b9
3 changed files with 48 additions and 74 deletions
|
|
@ -16,10 +16,7 @@ Langflow can be installed in multiple ways:
|
|||
|
||||
## Install and run Langflow Desktop
|
||||
|
||||
**Langflow Desktop** is a desktop version of Langflow that includes all the features of open source Langflow, with an additional [version management](#manage-your-version-of-langflow-desktop) feature for managing your Langflow version.
|
||||
|
||||
<Tabs groupId="os">
|
||||
<TabItem value="macOS" label="macOS">
|
||||
**Langflow Desktop** is a desktop version of Langflow that includes all the features of open source Langflow, with an additional [version management](#manage-your-version-of-langflow-desktop) feature for managing your Langflow version. Langflow Desktop is currently available for macOS.
|
||||
|
||||
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
|
||||
2. Click **Download Langflow**, enter your contact information, and then click **Download**.
|
||||
|
|
@ -28,25 +25,6 @@ Langflow can be installed in multiple ways:
|
|||
|
||||
After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart).
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="Windows" label="Windows">
|
||||
|
||||
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
|
||||
2. Click **Download Langflow**, enter your contact information, and then click **Download**.
|
||||
3. Open the **File Explorer**, and then navigate to **Downloads**.
|
||||
4. Double-click the downloaded `.msi` file, and then use the install wizard to install Langflow Desktop.
|
||||
|
||||
:::important
|
||||
Windows installations of Langflow Desktop require a C++ compiler that may not be present on your system. If you receive a `C++ Build Tools Required!` error, follow the on-screen prompt to install Microsoft C++ Build Tools, or [install Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/).
|
||||
:::
|
||||
|
||||
5. When the installation completes, open the Langflow application.
|
||||
|
||||
After confirming that Langflow is running, create your first flow with the [Quickstart](/get-started-quickstart).
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Manage your version of Langflow Desktop
|
||||
|
||||
When a new version of Langflow is available, Langflow Desktop displays an upgrade message.
|
||||
|
|
|
|||
|
|
@ -73,41 +73,41 @@ Langflow provides code snippets to help you get started with the Langflow API.
|
|||
|
||||
<Tabs groupId="Language">
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
|
||||
```python
|
||||
import requests
|
||||
|
||||
|
||||
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow
|
||||
|
||||
|
||||
# Request payload configuration
|
||||
payload = {
|
||||
"output_type": "chat",
|
||||
"input_type": "chat",
|
||||
"input_value": "hello world!"
|
||||
}
|
||||
|
||||
|
||||
# Request headers
|
||||
headers = {
|
||||
"Content-Type": "application/json"
|
||||
}
|
||||
|
||||
|
||||
try:
|
||||
# Send API request
|
||||
response = requests.request("POST", url, json=payload, headers=headers)
|
||||
response.raise_for_status() # Raise exception for bad status codes
|
||||
|
||||
|
||||
# Print response
|
||||
print(response.text)
|
||||
|
||||
|
||||
except requests.exceptions.RequestException as e:
|
||||
print(f"Error making API request: {e}")
|
||||
except ValueError as e:
|
||||
print(f"Error parsing response: {e}")
|
||||
```
|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
|
||||
```js
|
||||
const payload = {
|
||||
"output_type": "chat",
|
||||
|
|
@ -115,7 +115,7 @@ Langflow provides code snippets to help you get started with the Langflow API.
|
|||
"input_value": "hello world!",
|
||||
"session_id": "user_1"
|
||||
};
|
||||
|
||||
|
||||
const options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
@ -123,17 +123,17 @@ Langflow provides code snippets to help you get started with the Langflow API.
|
|||
},
|
||||
body: JSON.stringify(payload)
|
||||
};
|
||||
|
||||
|
||||
fetch('http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID', options)
|
||||
.then(response => response.json())
|
||||
.then(response => console.log(response))
|
||||
.catch(err => console.error(err));
|
||||
```
|
||||
|
||||
|
||||
</TabItem>
|
||||
|
||||
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
|
||||
```text
|
||||
curl --request POST \
|
||||
--url 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false' \
|
||||
|
|
@ -143,12 +143,12 @@ Langflow provides code snippets to help you get started with the Langflow API.
|
|||
"input_type": "chat",
|
||||
"input_value": "hello world!"
|
||||
}'
|
||||
|
||||
|
||||
# A 200 response confirms the call succeeded.
|
||||
```
|
||||
|
||||
|
||||
</TabItem>
|
||||
|
||||
|
||||
</Tabs>
|
||||
|
||||
2. Copy the snippet, paste it in a script file, and then run the script to send the request.
|
||||
|
|
@ -339,50 +339,50 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
|||
|
||||
<Tabs groupId="Languages">
|
||||
<TabItem value="Python" label="Python" default>
|
||||
|
||||
|
||||
```python
|
||||
import requests
|
||||
import json
|
||||
|
||||
|
||||
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"
|
||||
|
||||
|
||||
def ask_agent(question):
|
||||
payload = {
|
||||
"output_type": "chat",
|
||||
"input_type": "chat",
|
||||
"input_value": question,
|
||||
}
|
||||
|
||||
|
||||
headers = {"Content-Type": "application/json"}
|
||||
|
||||
|
||||
try:
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
response.raise_for_status()
|
||||
|
||||
|
||||
# Get the response message
|
||||
data = response.json()
|
||||
message = data["outputs"][0]["outputs"][0]["outputs"]["message"]["message"]
|
||||
return message
|
||||
|
||||
|
||||
except Exception as e:
|
||||
return f"Error: {str(e)}"
|
||||
|
||||
|
||||
def extract_message(data):
|
||||
try:
|
||||
return data["outputs"][0]["outputs"][0]["outputs"]["message"]["message"]
|
||||
except (KeyError, IndexError):
|
||||
return None
|
||||
|
||||
|
||||
# Store the previous answer from ask_agent response
|
||||
previous_answer = None
|
||||
|
||||
|
||||
# the terminal chat
|
||||
while True:
|
||||
# Get user input
|
||||
print("\nAsk the agent anything, such as 'What is 15 * 7?' or 'What is the capital of France?')")
|
||||
print("Type 'quit' to exit or 'compare' to see the previous answer")
|
||||
user_question = input("Your question: ")
|
||||
|
||||
|
||||
if user_question.lower() == 'quit':
|
||||
break
|
||||
elif user_question.lower() == 'compare':
|
||||
|
|
@ -391,30 +391,30 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
|||
else:
|
||||
print("\nNo previous answer to compare with!")
|
||||
continue
|
||||
|
||||
|
||||
# Get and display the answer
|
||||
result = ask_agent(user_question)
|
||||
print(f"\nAgent's answer: {result}")
|
||||
print(f"\nAgent's answer: {result}")
|
||||
# Store the answer for comparison
|
||||
previous_answer = result
|
||||
```
|
||||
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="JavaScript" label="JavaScript">
|
||||
|
||||
|
||||
```js
|
||||
const readline = require('readline');
|
||||
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
|
||||
|
||||
const url = 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID';
|
||||
|
||||
|
||||
// Store the previous answer from askAgent response
|
||||
let previousAnswer = null;
|
||||
|
||||
|
||||
// the agent flow, with question as input_value
|
||||
async function askAgent(question) {
|
||||
const payload = {
|
||||
|
|
@ -422,7 +422,7 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
|||
"input_type": "chat",
|
||||
"input_value": question
|
||||
};
|
||||
|
||||
|
||||
const options = {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
@ -430,11 +430,11 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
|||
},
|
||||
body: JSON.stringify(payload)
|
||||
};
|
||||
|
||||
|
||||
try {
|
||||
const response = await fetch(url, options);
|
||||
const data = await response.json();
|
||||
|
||||
|
||||
// Extract the message from the nested response
|
||||
const message = data.outputs[0].outputs[0].outputs.message.message;
|
||||
return message;
|
||||
|
|
@ -442,19 +442,19 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
|||
return `Error: ${error.message}`;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// the terminal chat
|
||||
async function startChat() {
|
||||
console.log("\nAsk the agent anything, such as 'What is 15 * 7?' or 'What is the capital of France?'");
|
||||
console.log("Type 'quit' to exit or 'compare' to see the previous answer");
|
||||
|
||||
|
||||
const askQuestion = () => {
|
||||
rl.question('\nYour question: ', async (userQuestion) => {
|
||||
if (userQuestion.toLowerCase() === 'quit') {
|
||||
rl.close();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (userQuestion.toLowerCase() === 'compare') {
|
||||
if (previousAnswer) {
|
||||
console.log(`\nPrevious answer was: ${previousAnswer}`);
|
||||
|
|
@ -464,20 +464,20 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
|||
askQuestion();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
const result = await askAgent(userQuestion);
|
||||
console.log(`\nAgent's answer: ${result}`);
|
||||
previousAnswer = result;
|
||||
askQuestion();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
askQuestion();
|
||||
}
|
||||
|
||||
|
||||
startChat();
|
||||
```
|
||||
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
|
@ -518,4 +518,4 @@ payload = {
|
|||
## Next steps
|
||||
|
||||
* [Model Context Protocol (MCP) servers](/mcp-server)
|
||||
* [Langflow deployment overview](/deployment-overview)
|
||||
* [Langflow deployment overview](/deployment-overview)
|
||||
|
|
@ -34,10 +34,6 @@ If you get an API key error when running a flow, try the following:
|
|||
|
||||
The following issues can occur when installing Langflow.
|
||||
|
||||
### C++ build tools required for Langflow Desktop on Windows
|
||||
|
||||
Microsoft Windows installations of Langflow Desktop require a C++ compiler that may not be present on your system. If you receive a `C++ Build Tools Required!` error, follow the on-screen prompt to install Microsoft C++ Build Tools, or [install Microsoft Visual Studio](https://visualstudio.microsoft.com/downloads/).
|
||||
|
||||
### Langflow installation freezes at pip dependency resolution
|
||||
|
||||
Installing Langflow OSS with `pip install langflow` slowly fails with this error message:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue