Chat-With-RTX-python-api icon indicating copy to clipboard operation
Chat-With-RTX-python-api copied to clipboard

Feature request: OpenAI-compatible api

Open whisper-bye opened this issue 10 months ago • 4 comments

Can chat with rtx be made into an OpenAI-compatible api service?

whisper-bye avatar Mar 29 '24 09:03 whisper-bye

chat with rtx is local so I don't see how it would work as an API compatible with openai

plop-dev avatar Apr 16 '24 14:04 plop-dev

https://ollama.com/blog/openai-compatibility

whisper-bye avatar Apr 17 '24 04:04 whisper-bye

Could you add italian language? Italian language is fundamental for literature and history!

JoeM71 avatar May 21 '24 14:05 JoeM71

Could you add italian language? Italian language is fundamental for literature and history!

I was able to add Russian language support for the 4th version of chatrtx.

from http.client import HTTPConnection

def send_message(message):
    connection = HTTPConnection('192.168.1.57', 18137)
    headers = {'Content-type': 'text/plain; charset=utf-8'}
    # Кодируем сообщение в UTF-8
    encoded_message = message.encode('utf-8')
    connection.request('POST', '/', encoded_message, headers)
    response = connection.getresponse()

    if response.status == 200:
        return response.read().decode('utf-8')
    else:
        raise Exception("Error: Server responded with status {}".format(response.status))

although it’s better to look at my entire project, since I’m still new to programming.

Bilalline avatar Sep 24 '24 18:09 Bilalline