Skip to content

Minami-su/Emotional-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

import json

import requests
url2 = "http://region-3.seetacloud.com:39423/create_item2"
history=[]#上下文
def chat(text,history):
    payload = {
        "text": text,
        "history": history
    }

    headers = {
        'Content-Type': 'application/json'
    }
    response = requests.post(url2, headers=headers, data=json.dumps(payload))
    response = response.json()
    answer=response["response"]
    history=response["history"]
    return answer,history
while True:
    text=input("user:")#输入
    answer,history=chat(text,history)
    print(answer)

About

Emotional ai

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published