openai-proxy connects the many open source models (ASR, TTS, LLMs) with OpenAI compatible APIs with existing tools that use OpenAI SDKs.
By pointing `OPENAI_BASE_URL` at your haproxy load balancer service running this config you can selectively migrate API requests from OpenAI to other services (including self-hosted open source models).
The __bma_read_filters function is designed to take all arguments and join them with
| to create a grep pattern. Adding quotes around $@ would break this functionality
because:
• Would be passed as: "arg1 arg2" arg3
• Results in: "arg1 arg2"|arg3
The unquoted version is correct here since the function is intentionally using word
splitting to create individual grep pattern elements.
This is one of those cases where the normal "always quote your variables" rule has a
valid exception because word splitting is part of the intended behavior.
They're good questions. I can tell you how I manage regions and accounts but am interested in learning how people think Bash-my-AWS might better support users in this regard.
The AWCLI, as well as SDKs all support grabbing Regions and account credentials from environment variables.
For Regions, I work tend to use the following aliases:
alias au='export AWS_DEFAULT_REGION=ap-southeast-2'
alias us='export AWS_DEFAULT_REGION=us-east-1'
alias dr='export AWS_DEFAULT_REGION=ap-southeast-1'
I normally work in a single Region and swap when required by typing the 2 character alias.
To run a script or command (doesn't have to be Bash-my-AWS) across all Regions I use region-each:
For AWS accounts, I type the name of the account and I'm in. For accounts using IDP (ldap/AD backed corporate logins) I generate aliases so I have tab completion and simple naming.
In accounts that are only setup to use AWS keys, I use aliases that export credentials kept in GPG encrypted files. Last time I looked, AWS docs suggested keeping these long lives credentials in plaintext files readable by your account. That's asking for trouble IMO, especially if they're kept in a known location that a compromised node library could exfiltrate them from.
AWSCLI v2 beta includes support for SSO so it's probably a good time to look at how BMA could include support for auth.
AWSCLI backward compatibility has been so good, I've never had a Bash-My-AWS command fail due to a change.
AWS CLI v2 previews were released in Nov 19 and while this may contain some breaking changes, I wouldn't be surprised if all the commands BMA uses continue to work as normal.
I looked, no one created packages with those 2 names that I could fine, although there are some clis for controlling spotify it seems. Were you referring to specific packages somewhere for github and spotify?
bash-my-github and bash-my-spotify are two things I've made a start on but are not public yet. They've been on the backburner for a while due to competing priorities.
I was able to write a simple command that returned all songs a friend and I had in common in our public playlists.
I forget the exact syntax but it was something roughly along the lines of:
$ sort <(
user-playlists alice | playlist-tracks
user-playlists bob | playlist-tracks
) | uniq --repeated
Claude Opus demonstrates advanced ability in spoken dialogue, assertiveness and respectful conversation.