0%

After upgrading ChatGPT iOS today, I found that it supports Background Conversations. After trying it out quickly, I think it’s amazing.

Here is an guide on how to use the feature.

https://static.1991421.cn/2024/2024-06-05-234237.jpeg

Requirement

  1. Currently, there are no restrictions. It’s just in the rolling out. If you don’t see the setting yet, please be patient.

  2. It’s recommended to upgrade the app to the latest version. I have upgraded to 1.2024.150 on iOS.

Enable Background Conversations

You can see the option in the settings, turn it on.

https://static.1991421.cn/2024/2024-06-05-232451.jpeg

Background Conversation

  1. Click the voice button in the chat to enter the chat interface

    https://static.1991421.cn/2024/2024-06-05-233536.jpeg

  2. You can chat with ChatGPT while using other apps or when the screen is off. You’ll have to manually turn off the conversation by returning to the app when you’re done chatting.

https://static.1991421.cn/2024/2024-06-05-232713.jpeg

I found the voice is still not Omni; it’s the old voice mode.

Connect fail?

If the chat fails to establish a connection, it is usually due to one of the following reasons:

  1. GPT service is down, which can be checked at https://status.openai.com/.
  2. Network issues. If you use a proxy client, you can try switching proxy to see if it works.

At the end

With Background Conversation, GPT has become more powerful. However, I am even more looking forward to Omni multi-modal support, hoping it will be released to the public soon.

ChatGPT has released the Memory function, that means GPT can remember things input before. Even when starting a new chat, GPT will remember the context.

Below is what I have learned.

Requirements

Memory function is available to both free and paid users but is being rolled out gradually. If you don’t see the Memory function, it means you haven’t got access yet, please be patient.

Memory for GPTs is also being rolled out gradually. If you don’t see the menu in GPTs settings, it means you haven’t got access yet.

Create Memory

Here is an example of the website version:

When chatting, if you trigger GPT to remember something, like saying Remember, I am from China, GPT will memorize this message.

Of course, if you input the case directly, such as introducing yourself, GPT will also memorize this message.

https://static.1991421.cn/2024/2024-05-29-140656.jpeg

Start a new chat and ask it directly, you will find that GPT already knows this information, proving that GPT has memory.

https://static.1991421.cn/2024/2024-05-29-224922.jpeg

Note

  • ChatGPT’s web/Mac App/Mobile App all support Memory function.
  • Temporary chat do not support Memory function.
  • Hovering over Memory Updated will open the Memory management menu directly.

Delete Memory

If you want to delete the Memory, you can also delete it through chat, for example, Forget that I am from China.

https://static.1991421.cn/2024/2024-05-29-230401.jpeg

Additionally, you can manage or disable Memory in Settings > Personalization > Memorydirectly.

https://static.1991421.cn/2024/2024-05-29-140825.jpeg https://static.1991421.cn/2024/2024-05-29-225300.jpeg

Note

Deleting a chat does not delete the related Memory, it can only be done through the above operations.

Limitations

OpenAI has not announced the size/number limit of Memory.

Personally, I guess it might still take up the token limit for context in the AI model. Looking forward to that OpenAI release more details later.

At the end

This’s all I know, let me know if you can share more details.

Documentation

Today, my ChatGPT account received a notification that ChatGPT Connected apps are available to use. I tried it out and found it quite impressive. Here, I noted what I have known.

Requirements

Currently, free users are not supported; only ChatGPT Plus, Team, and Enterprise paid users are supported.

If you are a paid user but cannot access it, it means you haven’t been rollout yet. Please be patient.

Entry

Note: Mac App/iOS App is not supported yet; only the web version is supported

You can connect Google Drive/Microsoft Drive by two ways.

  1. Prompt window

    https://openai.intercom-attachments-7.com/i/o/1051046716/23808bbbd7bb647daff4434e/1eZAvcM1O8hPnV8K9vqABXP620zwovM7zZsxzxDk5_aq4LG8KfOKDZL0xf5mv0F5GLDIH6_r4JiU0uRCUsfglq4SIyUzUcS0FFrAOCI5WGE2qOPOPxksYB58T-DB93VcLnHYWCHYQ5s8jctOEMAfCPY

  2. Settings

    https://static.1991421.cn/2024/2024-05-22-222314.jpeg

Once linked, you can open the cloud drive in the chat to select files to upload. If you want to cancel the linkage, just click Disconnect.

https://static.1991421.cn/2024/2024-05-22-223255.jpeg

File Upload Size Restrictions

Cloud drive file uploads have the same restrictions as local uploads. The specific restrictions are as follows:

  1. Each text/document size is limited to 512MB, with a file token limit of 2M.
  2. Image file size limit is 20MB per each image.
  3. Each user’s file usage limit is 10GB.
  4. Each organization’s file usage limit is 100GB.
  5. Folders are not supported.

Note: File usage refers to total usage, not the total size of files uploaded in a single upload. If file usage exceeds the limitation, an error will occur. You can resolve this by deleting files uploaded in recent chats/GPTs.

Will the Files Be Used for Training Models?

If you are a Team/Enterprise user, no worry.

If you are an Plus user, you need to manually turn off the switch to prevent your content from being used for model training.

https://static.1991421.cn/2024/2024-05-22-223019.jpeg

My User Experience

Connected App only enhances GPT file uploads so far. The files’ resource is no longer the local but from remote cloud drive. With this feature, users can directly upload cloud drive files to GPT and then use the Code Interpreter for file analysis.

That’s all I know for now. If you already have the access, have a try.

Documentation

Today, OpenAI released GPT4o, and they released a desktop App that you might not need Raycast AI or Alfred ChatGPT workflow anymore.

Since the App is in rolling out currently, so there are various issues. Below is what I know so far:

https://static.1991421.cn/2024/2024-05-14-210946.png

MacOS Requirement

The current App only supports Apple Silicon (macOS 14+).

OpenAI planned to launch a Windows version later this year.

App Download

if you got the access, you will see a notification on the Web. If you don’t see it, don’t worry, you can download it directly via the official link.

https://static.1991421.cn/2024/2024-05-14-210441.jpeg

The official link is: https://persistent.oaistatic.com/sidekick/public/ChatGPT_Desktop_public_latest.dmg

Login Failed

If you are a Plus user and have not received a download notification as mentioned above, you can solve it by a Hack method.

https://static.1991421.cn/2024/2024-05-14-211210.jpeg

The principle is to use a proxy tool to do a MitM on a specific request of the ChatGPT App and modify the authentication result to log in.

For example, with Surge, you can directly solve it by installing this module:

https://raw.githubusercontent.com/alanhg/surge-config/main/chatgpt-desktop.sgmodule

Charles/Proxyman or other tools are similar, find https://ab.chatgpt.com/v1/initialize , choose map local, replace all false with true as shown. Related Twitter also has similar tutorial posts, see https://twitter.com/NickADobos/status/1790172046552674803

Once the modification is completed, log back in and find it works.

If there is a failure, you need to make sure the proxy is working. If it still doesn’t work, you can try delete some cache:

1
rm ~/Library/Preferences/com.openai.chat.*

Free tier users/Plus users

As mentioned above, free tier users can login through the hack method, but can’t use normally.

Shortcuts

The App provides Shortcuts support, which is similar to the iOS version, thus you can easily integrate and use it.

https://static.1991421.cn/2024/2024-05-14-211914.png

URL Scheme

After analyse with the application. I found out that it only supports App launch currently:

chatgpt://

GPT4o

We’ll roll out a new versionof Voice Mode with GPT-4o in alpha within ChatGPTPlus in the coming weeks.

The voice mode of GPT4o will come soon.

The App-GPT4o supports the DALL-E3 and text. The corresponding API has been released to the public.

At the end

Above is all I known so far.

In my opinion, downloading e-book by Z-Library combined with Telegram will have the most comfortable experience. Just mark it here.

  1. Visit https://singlelogin.re
    1. If you don’t have an account, register one.
    2. If access fails, suggest to try using a proxy.
  2. Go to https://singlelogin.re/z-access#telegram_bot_tab to create a TG Bot.
  3. Once the TG Bot is successfully created, you can search for any book on your private Bot and click “download”.

https://static.1991421.cn/2024/2024-05-02-101044.jpeg

Note that the daily download resource is limited.

ChatGPT has been popular for a year now。It has also driven the use of SSE.

Here, I summarize my understanding of it.

https://static.1991421.cn/2024/2024-04-13-153102.jpeg

Advantages of SSE

  1. Uses the standard HTTP protocol, and not WebSocket. Relative to WebSocket, it has a smaller resource overhead.
  2. SSE transmits text data with simple overhead.

How to Use

  1. EventSource

    1
    2
    3
    4
    const evtSource = new EventSource("sse.php");
    evtSource.onmessage = (e) => {
    console.log(`message: ${e.data}`);
    };
  2. Fetch

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    fetch('/api/openai/stream', {
    method: 'post',
    headers: {
    'Content-Type': 'application/json;charset=utf-8',
    },
    body: JSON.stringify({
    messages
    })
    }).then(res => {
    const reader = res.body.getReader();
    let buffer = '';
    const readChunk = () => {
    reader.read()
    .then(({
    value,
    done
    }) => {
    if (done) {
    console.log('Stream finished');
    return;
    }

    const chunkString = new TextDecoder().decode(value);
    buffer += chunkString;

    let position;
    while ((position = buffer.indexOf('\n\n')) !== -1) {
    const completeMessage = buffer.slice(0, position);
    buffer = buffer.slice(position + 2);
    completeMessage.split('\n').forEach(line => {
    if (line.startsWith('data:')) {
    const jsonText = line.slice(5).trim();
    if (jsonText === '[DONE]') {
    console.log('done');
    return;
    }
    try {
    const dataObject = JSON.parse(jsonText);
    console.log(dataObject);
    } catch (error) {
    console.error('JSON parse error:', error, jsonText);
    }
    }
    });
    }
    readChunk();
    })
    .catch(error => {
    console.error(error);
    });
    };
    readChunk();
    })

Fetch vs EventSource

  1. Both have roughly the same compatibility.
  2. A disadvantage of EventSource is that it cannot send a request body, so it typically requires setting up a request to send messages first, then initiating EventSource. Fetch, like XHR, can carry a request body. Thus, I think Fetch is the better choice.

ChatGPT’s Effect

ChatGPT has long supported stream returns, which give users the effect of a typewriter. Here is how GPT does it:

ChatGPT uses Fetch, send request body, and the return type is text/event-stream; charset=utf-8, meaning the server continuously returns response chunk until it ends.

You can find requests can be found in the network, and the request url is https://chat.openai.com/backend-api/conversation

done.

Recently, WebShell needed to support file management under PowerShell. To perform file-related operations, it’s necessary to understand the relevant commands. Here’s the summary.

https://static.1991421.cn/2024/2024-03-31-114718.jpeg

Compress Folder

1
Compress-Archive -Path '${formatted}' -DestinationPath '${zipTempPath}'

Copy File/Folder

1
Copy-Item -Path '${filePath}' -Destination '${dirPath}' -Recurse -Force

Move File/Folder

1
Move-Item -Path '${filePath}' -Destination '${targetPath}' -Force

Extract ZIP Archive

1
Expand-Archive -Path '${path}.zip' -DestinationPath '${destinationPath}';Remove-Item -Path '${path}.zip' -Force

Delete File/Folder

1
Remove-Item -Path '${formatted}' -Recurse -Force

Create Folder

1
New-Item -Path '${formatted}' -ItemType Directory

Rename

1
Rename-Item -Path '${formatted}' -NewName '${newName}'

Multiple Command Execution

If need to execute multiple commands, unlike using && in Linux, PowerShell requires ;.

1
Move-Item -Path '${path}' -Destination '${path}.zip';Expand-Archive -Path '${path}.zip' -DestinationPath '${destinationPath}';Remove-Item -Path '${path}.zip' -Force

Common Issues

w2: Cannot load file C:\Program Files\node js\w2.ps1 because running scripts is disabled on this system.

1
2
3
4
5
6
# Run PowerShell as administrator

# Check the current PowerShell script execution policy
get-ExecutionPolicy
# Set PowerShell's execution policy to RemoteSigned
set-executionpolicy remotesigned

Path Contains []

If the path contains [], for example, executing Move-Item doesn’t throw an error but the execution is unsuccessful. The reason is that [] in the path is treated as regex, regardless of whether it’s a single or double quote. There are two solutions:

  1. Escape []

    For example:

    1
    Move-Item -Path 'C:\\Windows\\Temp\\`[漫威`] xxx.jar_1717312576427' -Destination 'C:\\Windows\\system32\\config\\systemprofile\\`[漫威`] xxx.jar' -Force
  2. Change -Path to -LiteralPath

    1
    Move-Item -LiteralPath 'C:\\Windows\\system32\\config\\systemprofile\\123 456\\[漫威] xxx.jar' -Destination 'C:\\Windows\\system32\\config\\systemprofile\\789\\[漫威] xxx.jar' -Force

Write at the End

When executing Windows commands, you can choose between PowerShell and CMD. According to Microsoft’s recommendation, using PowerShell is advised, as CMD has entered the maintenance phase.

Documentation

In development, I hope that user can invoke the RDP app by one click on the web page. I think URL Scheme is the answer.

Actual tests have found that the support for RDP URL Scheme is incomplete.

Platform

  1. MacOS

    System version has behave different, actual verification: BigSur supports ok.

    1
    rdp://full%20address=s:<ip>:<port>&username=s:Administrator

    Click to test

    Sonoma not work

    Failed to launch ‘rdp://full%20address=s:127.0.0.1:3389&username=s:Administrator’ because the scheme does not have a registered handler.

    manual install RDP

  2. Windows

    Only supports launching the RDP client, but cannot pass any parameter.

    Click to test

RDP File Download

The currently perfect support is for users to manually download the .rdp file and open it manually. The File content is followdings.

1
2
full address:s:9.9.9.9:3389
username:s:administrator

注意MacOS需手动安装Microsoft Remote Desktop

Note: Microsoft Remote Desktop is required in MacOS.

Docs

Recently, when using an open source tool, I found a tool called tmux. Then I found that Tmux is quite popular, the repo star has 20K+, and my commonly used iTerm2 is also integrated with tmux. Based on this, it is necessary to understand tmux and clarify the usage scenarios.

Since the current use is still shallow, please point out if any mistakes

Concept

Start with the concept and understand its function.

tmux is a terminal multiplexer. It lets you switch easily between several programs in one terminal, detach them (they keep running in the background) and reattach them to a different terminal.

  1. Personal understanding is that tmux saves the terminal session on-site. For example, SSH is connected to a VPS, vi edit a file, directly closes the session, and then reopens the connection, you will find that the state is lost, you need to re-enter the target path and reopen it edit. With tmux, you can save this session, re-access the target machine, load the previously saved session, and everything will be restored as before.
  2. The reason why tmux can save sessions is because after tmux is installed on the target server, a separate service will be started for on-site saving.

Tmux Installation

Understand the above principles, you can understand that tmux is not necessarily installed locally, but installed on the machine that needs to save the session.

The installation commands in common operating system environments are as follows

1
2
3
4
5
# macOS
brew install tmux

# centos
yum install tmux
Read more »

Recently, a community project received a request for users to connect an external camera to their Mac, hoping that Alfred would support one-click switching between different cameras. Because there is a rarely need to open video, I haven’t noticed how to use an external device on a Mac before, so I try it here.

Camera Installation

I remembered that I once bought a Logitech Webcam C110, so I found it and tried it, USB interface, I converted the connection through the docking station USB=>TypeC, then opened Tencent Meeting or Facetime, and can see the plug in the camera options of new equipment. Select Discovery work.

After trying, I found a few problems

  1. The settings such as default camera/disabling a camera can‘t be selected in the Apple Settings Center.
  2. It can only be set correspondingly in the app that uses the camera, such as Tencent Meeting, and the setting can’t be shared.

Scenarios

At home, I often run my Mac in host mode. In host mode, mic/camera is unavailable. At this time, if there is a video demand, the value of an external camera will appear, and the camera quality of the Mac is not so good as well.

Alfred Support

After solving how to use the external camera, looking back at the efficiency plug-in support of netizens, the Mac GUI must have a setting place, or the terminal/command has corresponding support.

I found that through the command system_profiler SPCameraDataType -json that comes with the Mac after searching material, I can get all the camera devices connected to the Mac, but script control to open a camera is not supported, therefore it is impossible to switch cameras with one key in Alfred.

Finally, the conclusion is that the camera list can be displayed, but the specific operation to open a camera is not work.

Write at the End

  • When the Mac is turn off, the external camera still needs to be operated in a specific app. At present, there is no way to solve this automatically.