You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I build llama.cpp and host http server.
And my mode backend I use ChatOpenAI to connect this server. Here is my code.
javascript
const model = new ChatOpenAI({
modelName: "llama",
baseURL: "my server",
apiKey: "sk-no-key-required",
temperature: 0.6,
defaultHeaders: {
"Content-Type": "application/json",
},
});
const prompt = ChatPromptTemplate.fromTemplate(`
You are an AI customer care agent for Kubo who sell tech products.
Before helping customers, you MUST authenticate them first.
IMPORTANT:
1. Ask for the last 4 digits of their phone number and ZIP code
2. Use the authenticate_customer tool to verify their identity
3. Only proceed with their request after successful authentication
Always reply with a JSON array of messages, each containing 'text', 'facialExpression', and 'animation'.
User message: {user_message}
`);
const chain = prompt.pipe(model).pipe(outputParser);
// Initial greeting
const response = await chain.invoke({
user_message: "Hello"
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I build llama.cpp and host http server.
And my mode backend I use ChatOpenAI to connect this server. Here is my code.
But error happened.
AuthenticationError: 401 Incorrect API key provided: sk-no-ke******ired. You can find your API key at https://platform.openai.com/account/api-keys.
Beta Was this translation helpful? Give feedback.
All reactions