Giter Club home page Giter Club logo

aih's Introduction

Talk to AI modes in terminal.

screenshot

Usage

Download binary file then type:

./aih

Command list

Command Operation
. Select AI mode of Bard/ChatGPT/Claude2/Llama2/Falcon180
Previous input
Next input
<< Start multiple lines input mode
>> End multiple lines input mode
j Scroll down
k Scroll up
f Page down
p Page up
g Scroll to top
G Scroll to bottom
q or Enter Back to conversation
.v Mini vi to edit quest, :ai send, :q cancel
.c or .clear Clear the screen
.h or .history Show history of conversations
.r or .restart Re-start AI model
.proxy Set proxy, for example: socks5://127.0.0.1:7890
.help Show help
.exit Exit Aih

Prerequisites

Tips

  • Close Chrome browser before run Aih at the first time.
  • More usage of command Liner.
  • More usage of mini vi.
  • Answer will be auotmatically saved in system clipboard for pasting.
  • Conversations were persisted in history.txt beside Aih binary.
  • ./aih -rod=show to monitor in browser.
  • All-In-One mode will display answers from all the AI modes.

screenshot

Supported OS

  • Mac/Linux/Windows

Installation

$ git clone https://github.com/Databingo/aih
$ go clean -cache && go clean -modcache 
$ cd aih/ryy && go mod tidy && go build -o ../vi && cd ..
$ go mod tidy && go build -tags vi

Acknowledgements

  • github.com/rivo/tview
  • github.com/peterh/liner
  • github.com/gdamore/tcell/v2
  • github.com/atotto/clipboard
  • github.com/go-rod/rod
  • github.com/go-rod/stealth
  • github.com/tidwall/gjson
  • github.com/tidwall/sjson
  • github.com/manifoldco/promptui
  • github.com/sashabaranov/go-openai
  • github.com/kiasaki/ry

Todo

  • x for disable certain AI mode.
  • Change deamon mode to minimal browser mode for passing bot checking of ChatGPT.

License

MIT and "You can choose not to include this MIT license into your copies".

aih's People

Contributors

databingo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aih's Issues

Bard AI is not working with a json unmarshall error

image

I think the error is something about "json: cannot unmarshal string into Go value of type []interface {}", in the bard module,

It originally works ok, but someday, it fail to work, I tried the latest version, still don't work.

My go version is 1.20.

Thanks for your effort.

panic: runtime error

go 1.20

.bard> .key
✔ Set Google Bard Cookie

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xa0 pc=0x8a9950]

goroutine 1 [running]:
main.main()
        aih/main.go:516 +0x1d90

License

Seems like a useful tool! :) Can you please add a license for it?

Best,
Niklas

Broken binaries in releases

Since 0.2 all 12 provided binaries are identical.
E.g. I download windows binary, and see aih.exe file, but it is not EXE inside, it is impossible to execute it.

P.S.
I have tried to build it myself, but:

vi.go:6:12: pattern vi: no matching files found

How to config cloude in slack app?

I follow the step create a app and get the user oauth token. but can't get it work. Do i need to create a channel ,and add my app and claude app into the new channel ,use the new channel id?

For Cloude in Slack, create an Slack App by click Create New App, then click From scratch, then click Create App, find OAuth & Permissions->Scope->User Token Scope, add these promisions:
channels:history
channels:read
chat:write
files:write
groups:history
groups:read
im:history
im:read
im:write
mpim:history
mpim:read
team:read
users:read
then click Install to Workspace to find your User OAuth Token; You can obtain your channel_id by open the webside of chating with Claude in Slack via format of https://app.slack.com/client/xxxxx/yyyyy, then yyyyy is it.

Mistakingly used uncorrect input for bing cookies, now aih panic every time I invoke it

panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/Databingo/EdgeGPT-Go/internal/CookieManager.(*Manager).findMinIndex(...)
/Users/chengang/go/pkg/mod/github.com/!databingo/!edge!g!p!t-![email protected]/internal/CookieManager/manager.go:92
github.com/Databingo/EdgeGPT-Go/internal/CookieManager.(*Manager).GetBestCookie(0x1?)
/Users/chengang/go/pkg/mod/github.com/!databingo/!edge!g!p!t-![email protected]/internal/CookieManager/manager.go:76 +0x131
github.com/Databingo/EdgeGPT-Go.NewGPT(0xc0000baf80)
/Users/chengang/go/pkg/mod/github.com/!databingo/!edge!g!p!t-![email protected]/gpt.go:46 +0x3d
github.com/Databingo/EdgeGPT-Go.(*Storage).GetOrSet(0xc00011d4b8, {0xa359d1, 0x7})
/Users/chengang/go/pkg/mod/github.com/!databingo/!edge!g!p!t-![email protected]/storage.go:31 +0xab
main.main()
/usr/local/projects/aih/main.go:166 +0xbd8

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.