-
Hello, import os and the result was as below; ['Je', Please tell me if there is any mistake with my coding. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dkbs12 it looks like the problem is that you pass a string "I am a boy" to the import os
from haystack.nodes import PromptNode, PromptTemplate
from haystack.schema import Document
translation_template = PromptTemplate("deepset/translation")
prompt_node = PromptNode(model_name_or_path="text-davinci-003", api_key=os.environ.get("OPENAI_API_KEY"))
prompt_node.prompt(prompt_template=translation_template, documents=[Document(content="I am a boy")], target_language="french") You can also experiment with "gpt-3.5-turbo-instruct" instead of "text-davinci-003". |
Beta Was this translation helpful? Give feedback.
Hello,
Thank you for your help.
I tried to test with this set of API for many times and found that almost every response was done correctly.
However, the downside seems to be that the response time takes a long more than approximatelt 5 seconds.
Thank you again.