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
|
## 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.
|
**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.
|
||||||
|
|
||||||
<Tabs groupId="os">
|
|
||||||
<TabItem value="macOS" label="macOS">
|
|
||||||
|
|
||||||
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
|
1. Navigate to [Langflow Desktop](https://www.langflow.org/desktop).
|
||||||
2. Click **Download Langflow**, enter your contact information, and then click **Download**.
|
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).
|
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
|
### Manage your version of Langflow Desktop
|
||||||
|
|
||||||
When a new version of Langflow is available, Langflow Desktop displays an upgrade message.
|
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">
|
<Tabs groupId="Language">
|
||||||
<TabItem value="Python" label="Python" default>
|
<TabItem value="Python" label="Python" default>
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow
|
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow
|
||||||
|
|
||||||
# Request payload configuration
|
# Request payload configuration
|
||||||
payload = {
|
payload = {
|
||||||
"output_type": "chat",
|
"output_type": "chat",
|
||||||
"input_type": "chat",
|
"input_type": "chat",
|
||||||
"input_value": "hello world!"
|
"input_value": "hello world!"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Request headers
|
# Request headers
|
||||||
headers = {
|
headers = {
|
||||||
"Content-Type": "application/json"
|
"Content-Type": "application/json"
|
||||||
}
|
}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Send API request
|
# Send API request
|
||||||
response = requests.request("POST", url, json=payload, headers=headers)
|
response = requests.request("POST", url, json=payload, headers=headers)
|
||||||
response.raise_for_status() # Raise exception for bad status codes
|
response.raise_for_status() # Raise exception for bad status codes
|
||||||
|
|
||||||
# Print response
|
# Print response
|
||||||
print(response.text)
|
print(response.text)
|
||||||
|
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
print(f"Error making API request: {e}")
|
print(f"Error making API request: {e}")
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
print(f"Error parsing response: {e}")
|
print(f"Error parsing response: {e}")
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="JavaScript" label="JavaScript">
|
<TabItem value="JavaScript" label="JavaScript">
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const payload = {
|
const payload = {
|
||||||
"output_type": "chat",
|
"output_type": "chat",
|
||||||
|
|
@ -115,7 +115,7 @@ Langflow provides code snippets to help you get started with the Langflow API.
|
||||||
"input_value": "hello world!",
|
"input_value": "hello world!",
|
||||||
"session_id": "user_1"
|
"session_id": "user_1"
|
||||||
};
|
};
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -123,17 +123,17 @@ Langflow provides code snippets to help you get started with the Langflow API.
|
||||||
},
|
},
|
||||||
body: JSON.stringify(payload)
|
body: JSON.stringify(payload)
|
||||||
};
|
};
|
||||||
|
|
||||||
fetch('http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID', options)
|
fetch('http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID', options)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(response => console.log(response))
|
.then(response => console.log(response))
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
<TabItem value="curl" label="curl">
|
<TabItem value="curl" label="curl">
|
||||||
|
|
||||||
```text
|
```text
|
||||||
curl --request POST \
|
curl --request POST \
|
||||||
--url 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false' \
|
--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_type": "chat",
|
||||||
"input_value": "hello world!"
|
"input_value": "hello world!"
|
||||||
}'
|
}'
|
||||||
|
|
||||||
# A 200 response confirms the call succeeded.
|
# A 200 response confirms the call succeeded.
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
2. Copy the snippet, paste it in a script file, and then run the script to send the request.
|
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">
|
<Tabs groupId="Languages">
|
||||||
<TabItem value="Python" label="Python" default>
|
<TabItem value="Python" label="Python" default>
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import requests
|
import requests
|
||||||
import json
|
import json
|
||||||
|
|
||||||
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"
|
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"
|
||||||
|
|
||||||
def ask_agent(question):
|
def ask_agent(question):
|
||||||
payload = {
|
payload = {
|
||||||
"output_type": "chat",
|
"output_type": "chat",
|
||||||
"input_type": "chat",
|
"input_type": "chat",
|
||||||
"input_value": question,
|
"input_value": question,
|
||||||
}
|
}
|
||||||
|
|
||||||
headers = {"Content-Type": "application/json"}
|
headers = {"Content-Type": "application/json"}
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response = requests.post(url, json=payload, headers=headers)
|
response = requests.post(url, json=payload, headers=headers)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
# Get the response message
|
# Get the response message
|
||||||
data = response.json()
|
data = response.json()
|
||||||
message = data["outputs"][0]["outputs"][0]["outputs"]["message"]["message"]
|
message = data["outputs"][0]["outputs"][0]["outputs"]["message"]["message"]
|
||||||
return message
|
return message
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return f"Error: {str(e)}"
|
return f"Error: {str(e)}"
|
||||||
|
|
||||||
def extract_message(data):
|
def extract_message(data):
|
||||||
try:
|
try:
|
||||||
return data["outputs"][0]["outputs"][0]["outputs"]["message"]["message"]
|
return data["outputs"][0]["outputs"][0]["outputs"]["message"]["message"]
|
||||||
except (KeyError, IndexError):
|
except (KeyError, IndexError):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Store the previous answer from ask_agent response
|
# Store the previous answer from ask_agent response
|
||||||
previous_answer = None
|
previous_answer = None
|
||||||
|
|
||||||
# the terminal chat
|
# the terminal chat
|
||||||
while True:
|
while True:
|
||||||
# Get user input
|
# Get user input
|
||||||
print("\nAsk the agent anything, such as 'What is 15 * 7?' or 'What is the capital of France?')")
|
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")
|
print("Type 'quit' to exit or 'compare' to see the previous answer")
|
||||||
user_question = input("Your question: ")
|
user_question = input("Your question: ")
|
||||||
|
|
||||||
if user_question.lower() == 'quit':
|
if user_question.lower() == 'quit':
|
||||||
break
|
break
|
||||||
elif user_question.lower() == 'compare':
|
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:
|
else:
|
||||||
print("\nNo previous answer to compare with!")
|
print("\nNo previous answer to compare with!")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Get and display the answer
|
# Get and display the answer
|
||||||
result = ask_agent(user_question)
|
result = ask_agent(user_question)
|
||||||
print(f"\nAgent's answer: {result}")
|
print(f"\nAgent's answer: {result}")
|
||||||
# Store the answer for comparison
|
# Store the answer for comparison
|
||||||
previous_answer = result
|
previous_answer = result
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem value="JavaScript" label="JavaScript">
|
<TabItem value="JavaScript" label="JavaScript">
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const readline = require('readline');
|
const readline = require('readline');
|
||||||
|
|
||||||
const rl = readline.createInterface({
|
const rl = readline.createInterface({
|
||||||
input: process.stdin,
|
input: process.stdin,
|
||||||
output: process.stdout
|
output: process.stdout
|
||||||
});
|
});
|
||||||
|
|
||||||
const url = 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID';
|
const url = 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID';
|
||||||
|
|
||||||
// Store the previous answer from askAgent response
|
// Store the previous answer from askAgent response
|
||||||
let previousAnswer = null;
|
let previousAnswer = null;
|
||||||
|
|
||||||
// the agent flow, with question as input_value
|
// the agent flow, with question as input_value
|
||||||
async function askAgent(question) {
|
async function askAgent(question) {
|
||||||
const payload = {
|
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_type": "chat",
|
||||||
"input_value": question
|
"input_value": question
|
||||||
};
|
};
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
@ -430,11 +430,11 @@ This script runs a question-and-answer chat in your terminal and stores the Agen
|
||||||
},
|
},
|
||||||
body: JSON.stringify(payload)
|
body: JSON.stringify(payload)
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(url, options);
|
const response = await fetch(url, options);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
// Extract the message from the nested response
|
// Extract the message from the nested response
|
||||||
const message = data.outputs[0].outputs[0].outputs.message.message;
|
const message = data.outputs[0].outputs[0].outputs.message.message;
|
||||||
return 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}`;
|
return `Error: ${error.message}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// the terminal chat
|
// the terminal chat
|
||||||
async function startChat() {
|
async function startChat() {
|
||||||
console.log("\nAsk the agent anything, such as 'What is 15 * 7?' or 'What is the capital of France?'");
|
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");
|
console.log("Type 'quit' to exit or 'compare' to see the previous answer");
|
||||||
|
|
||||||
const askQuestion = () => {
|
const askQuestion = () => {
|
||||||
rl.question('\nYour question: ', async (userQuestion) => {
|
rl.question('\nYour question: ', async (userQuestion) => {
|
||||||
if (userQuestion.toLowerCase() === 'quit') {
|
if (userQuestion.toLowerCase() === 'quit') {
|
||||||
rl.close();
|
rl.close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (userQuestion.toLowerCase() === 'compare') {
|
if (userQuestion.toLowerCase() === 'compare') {
|
||||||
if (previousAnswer) {
|
if (previousAnswer) {
|
||||||
console.log(`\nPrevious answer was: ${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();
|
askQuestion();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await askAgent(userQuestion);
|
const result = await askAgent(userQuestion);
|
||||||
console.log(`\nAgent's answer: ${result}`);
|
console.log(`\nAgent's answer: ${result}`);
|
||||||
previousAnswer = result;
|
previousAnswer = result;
|
||||||
askQuestion();
|
askQuestion();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
askQuestion();
|
askQuestion();
|
||||||
}
|
}
|
||||||
|
|
||||||
startChat();
|
startChat();
|
||||||
```
|
```
|
||||||
|
|
||||||
</TabItem>
|
</TabItem>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
|
|
@ -518,4 +518,4 @@ payload = {
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
||||||
* [Model Context Protocol (MCP) servers](/mcp-server)
|
* [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.
|
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
|
### Langflow installation freezes at pip dependency resolution
|
||||||
|
|
||||||
Installing Langflow OSS with `pip install langflow` slowly fails with this error message:
|
Installing Langflow OSS with `pip install langflow` slowly fails with this error message:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue