CambioML / pykoi-rlhf-finetuned-transformers

pykoi: Active learning in one unified interface
https://www.cambioml.com
Apache License 2.0
407 stars 43 forks source link

How to connect to the model endpoint ? #44

Closed freemjstudio closed 1 year ago

freemjstudio commented 1 year ago

Hi this is my code and I'd like to use my azure openai endpoint but it doesn't work . I really wanna try to use the pykoi app. Could anybody give me a good solution ? Thanks.

image

image

`import pykoi as pk import openai

openai.api_type = "azure" openai.api_base = "" openai.api_version = "2022-12-01" OPENAI_API_KEY = "" openai.api_key = OPENAI_API_KEY

model = "endpoint"

add chatbot to model

chatbot = pk.Chatbot(model, feedback='vote')

analyze chatbot usage & feedback

dashboard = pk.Dashboard(chatbot)

Create sharable link to the application

app = pk.Application(share=True, username="test", password="1234") app.add_component(chatbot) app.add_component(dashboard) app.run() `

freemjstudio commented 1 year ago

OK I GOT THE IDEA ! I could successfully connect to the model by using the python class. It's under the llm folder!

image

image

happy coding !